Free tool · no sign-up · runs in your browser
LLM JSON repair.
Paste what the model sent back. The tool tries four steps in order, stops at the first one that works and tells you which fix it needed: as is, strip code fences, cut the JSON out of the prose, then repair the syntax. Nothing is uploaded.
The model's reply
Or load a real broken reply from our benchmark:
What each step does
- 1. JSON.parse as is. If JSON.parse accepts the reply and returns an object, nothing is changed.
- 2. Strip code fences. Models love to wrap JSON in
```jsonblocks. The tool keeps what is inside the first fence. - 3. Cut out the first {...}. A string-aware bracket scan finds the first complete object or array, so "Here is your JSON:" and trailing notes are dropped.
- 4. Repair the syntax. Removes
//comments, quotes bare keys, turns single quotes into double quotes (only when the reply has no double quotes, so apostrophes survive), maps PythonTrue/False/None, removes trailing commas, and closes brackets a cut-off reply left open.
Valid JSON is not the right JSON
In our benchmark of 432 replies from three small models running in the browser, this ladder lifted parseable replies from 84 to 127 of 288. But a parser cannot invent a missing key or fix a key the model renamed. With one common sampling setting, no_repeat_ngram_size, Llama 3.2 1B wrote keys like " qty" and ".name" and valid-to-the-schema output fell from 75% to 4%. Fix the settings first, then parse. Read the full benchmark.
Who made this
Matt Busel, a one-person studio. The same models power the chat creatures in BEINGS, which run entirely in your browser. More: Run an LLM in the browser · LLM API cost calculator.
Runs locally. Nothing you paste leaves this page.