JSON Repair
Paste JSON that will not parse. It gets explained, then fixed, with a diff.
What changed
About this tool
A JSON repair engine takes a document that will not parse and produces the closest valid JSON, then shows you exactly what it changed. It handles more than thirty known breakage patterns: trailing commas, single quotes, unquoted keys, comments, Python True/False/None, missing brackets, and truncated files.
A growing share of broken JSON arrives from chat models: a response wrapped in a ```json fence, prefixed with "Here's your JSON:", or with commentary glued after the closing brace. Clean up AI output — on by default — strips that envelope before repairing what is left.
When something cannot be fixed without guessing at your intent, the tool says precisely what is still wrong instead of inventing a result. Nothing is ever rewritten silently.
How to use it
- Paste the broken JSON — or the entire chat reply, fence and all.
- Read the findings: each one names what is wrong and where, in plain English.
- Press Fix it. The repaired document replaces your input, and the report lists every change, grouped and counted — never a silent rewrite.
Worked example
This reply has a fence, a prose prefix, single quotes and a trailing comma. Cleanup strips the envelope; repair fixes the syntax; the report lists each change.
Sure! Here's your config:
```json
{
'port': 8080,
'host': 'localhost',
}
```
Let me know if you need changes! One document, four problems