1. Home
  2. Tools
  3. JSON Repair

Fix broken JSON instead of hunting for the missing brace

Copy a response out of the terminal, paste it into a form, and lose twenty minutes to a trailing comma. This repairs the common ways JSON breaks and tells you exactly what it changed.

Repairs
9 common faults
Output
Valid JSON
Upload
None
JSON Repair Repairs run in your browser, nothing is uploaded
What was changed

Measured on Apple M4 Max: 102 ms repair trailing commas, single quotes and bare keys (1.0 MB of broken JSON) See the benchmarks

How to use it

  1. Paste the broken text The output of a curl command, a log line, a truncated response or something an LLM produced. It does not have to be close to valid.
  2. Let it repair The tool applies the fixes in order, from the safe to the risky, and reports which ones it used.
  3. Check the diff Every change is listed with the reason, so you can see whether the repair was sensible before you trust the result.

Reference

What it can fix

Broken inputThe fault
`{"a": 1,}`Trailing comma
{'a': 1}Single quotes instead of double
`{a: 1}`Unquoted key
`{"a": 1} // note`A trailing comment
`{"a": "he said "hi""}`Unescaped quotes inside a string
`{"a": [1, 2}`A missing closing bracket
`{"a": 1`A truncated response

Questions people ask

Can it fix JSON that is truncated mid-object?

It can add the closing brackets, and it reports that it did so. Where the truncation happened is a guess, so treat the repaired value as an approximation and check it against the source.

Does it change any values?

It does not change a value that parses. It only repairs syntax, and every repair is listed with its reason.

What happens to comments?

A comment is not valid JSON, so it has to go. The tool removes it and reports that it did.

Can it repair YAML or XML?

No. It is a JSON repairer. The YAML converter and the XML formatter each handle their own format properly rather than through a generic repair path.

Is my payload uploaded?

No. The repair runs in the browser, which is the whole point: the payloads that need repairing are usually the ones you would least like to paste into a form.

Why does it not fix everything?

Because beyond a point the input is not recoverable in a principled way. A document that is 40% missing is a document where any output is a fabrication, and the tool would rather tell you that.

Where this earns its keep

A response that is almost JSON

Most APIs return valid JSON and the failures are in what surrounds it: a log prefix, a trailing comma, a copy-paste that picked up a smart quote. Those are all recoverable.

A truncated download

A response cut off mid-object is missing its closing braces. The repair adds them, and the output tells you it had to guess where the structure ended.

Configuration pasted from a chat window

Copy-paste from a terminal or a chat app often brings curly quotes and typographic dashes with it. Both are silently converted back.

Details that catch people out

A repair is a guess, and the tool says so

Repairing malformed input is inference. Where the original was ambiguous, the tool applies the most common convention and lists it under "changes". A repair is a first draft of the document, not the document itself.

What it will not do

It does not invent missing values, guess which of two conflicting keys is right, or turn a completely different format into JSON. If the input is not JSON-shaped at all, the tool says so rather than producing something plausible.

The payload that needs repairing is the one you cannot paste anywhere

A broken payload is usually a payload that contains something sensitive, because it came from a production log, a customer record or a private endpoint. Pasting it into a repair website means handing it to a third party at exactly the moment you least want to.

  • The repair runs in the browser tab.
  • Every change is reported, so nothing is changed silently.
  • The output is validated with a real JSON parser before it is returned.
  • If the input is not recoverable, it says so instead of guessing.

Guides that go deeper

Last reviewed 2026-10-16. Every tool on DevSnap runs entirely in your browser, so whatever you paste here never reaches a server.