Home › JSON Repair

JSON Repair — with an explanation for every fix

Direct answer: paste broken JSON below and press Repair JSON. You get the repaired document plus a Repair Report listing every change — where it is, what rule fixed it, and what it looked like before. It runs entirely in your browser; your payload is never uploaded, and there is no size cap beyond your device's memory.

Repair your JSON

Processed in your browser, so big pastes don't freeze the page. Nothing is uploaded — check your browser's network tab if you'd like to verify.

How it works

  1. Paste the broken JSON, or drop the file onto the panel.
  2. Press Repair JSON. The document is repaired locally, in your browser.
  3. Read the Repair Report: every change with its location and rule.
  4. Copy or download the repaired JSON — and the report, if it needs to travel with the fix.

The repair follows a fixed, deterministic set of rules — see how deterministic repair works for the full rule list in plain language. Deterministic means the same input always produces the same output and the same report, which is what makes the report safe to attach to a ticket or a code review.

What gets fixed — and what honestly doesn't

BreakageRepair
Trailing commas, missing commas/colonsRemoved / added, each one listed
Single quotes, unquoted keysConverted to standard double-quoted JSON
Comments (//, /* */)Removed, listed
Markdown fences + prose around the payloadStripped, listed — the standard LLM paste
True / False / None, undefined, NaN, InfinityConverted to true / false / null, listed
Document ends earlyOpen strings/objects/arrays closed and listed. For a truly cut-off document, Truncated Recovery is stricter: it never completes a cut-off token
Duplicate keysPreserved, flagged as a note — never silently dropped
A value is simply missing ({"a": })Honest failure. Any value we put there would be invented data

Frequently asked questions

What kinds of breakage can it repair?

The deterministic families: trailing commas, missing commas and colons, single-quoted strings, unquoted keys, // and /* */ comments, markdown code fences and surrounding prose (the classic LLM paste), Python literals (True, False, None), undefined / NaN / Infinity, stray control characters in strings, malformed numbers, and documents that end early (unclosed strings, objects and arrays are closed and listed). What it will not do is invent a missing value — {"a": } fails honestly, because any "fix" would be a guess.

What does the Repair Report contain?

One row per change: its number, the line and column, the JSON path where determinable, the plain-language rule applied (for example "Removed trailing comma"), and short before/after snippets. Notes — observations that are not changes, like a duplicate key being preserved — are marked as notes. The report downloads as Markdown.

My JSON has two objects back to back. What happens?

The first value is repaired and the tool tells you a second value was found. Concatenated values usually mean one of two things: a stream of records (use NDJSON Salvage, one value per line) or two responses pasted together (repair each separately). The tool never merges them silently.

Is there a size limit?

No artificial one. Repair runs entirely in your browser, on your device; the design targets are roughly 10 MB pasted and 25 MB by file, and the real ceiling is your device's memory. If a run cannot complete, you get split guidance instead of an upsell.