JSON Repair — Fix & Correct Invalid JSON
Paste broken JSON and get it fixed automatically — trailing commas, single quotes, unquoted keys, comments and missing brackets are repaired, then the result is formatted. Everything runs in your browser; nothing is uploaded.
What does a JSON repair tool fix?
JSON has strict rules, so a single stray character can make a whole file unparseable. A JSON repair (or JSON fixer / JSON corrector) tool detects the most common mistakes and rewrites your input into valid JSON that conforms to the spec (RFC 8259), then formats it. It is the fastest way to fix broken JSON copied from logs, half-written config files, or JavaScript object literals. This repairer fixes:
- Trailing commas — removes the illegal comma in
[1, 2, 3,] - Single quotes — converts
'value'to valid double-quoted"value" - Unquoted keys — turns
{name: "John"}into{"name": "John"} - Comments — strips
// lineand/* block */comments, which JSON does not allow - Python & JavaScript literals — maps
None/True/False/NaN/undefinedtonull/true/false - Missing closing brackets — balances an unclosed
{or[ - Smart quotes — replaces “curly” quotes pasted from documents with straight quotes
Repairs are string-aware — fixes are only applied to JSON structure, never to the contents of your string values, so a comma or apostrophe inside a string is preserved. Once repaired, use the JSON Formatter to beautify it further, the JSON Validator to double-check it, or the JSON Minifier to compress it.
Frequently Asked Questions
How do I fix broken JSON?
Paste it into the panel on the left — the repairer automatically removes trailing commas, converts single quotes to double quotes, quotes unquoted keys, strips comments, replaces non-JSON literals, and balances missing brackets, then formats the result. Copy the repaired JSON from the right panel.
Will it change the data inside my strings?
No. The repair is string-aware: it only edits JSON structure (commas, quotes around keys, brackets), never the characters inside your string values. A comma, colon, or apostrophe inside a quoted string is left exactly as-is.
What's the difference between repair and validate?
The JSON Validator only tells you where the error is. The repair tool goes further and fixes the common errors for you automatically, then formats the corrected JSON.
Is my data safe?
Yes. All repair runs entirely in your browser. Nothing is uploaded to any server.
Why can't some JSON be repaired automatically?
Some errors are ambiguous — for example a missing value, a misspelled keyword, or a missing comma between items can have more than one correct fix. When that happens the tool repairs everything it safely can and shows the remaining error so you can finish it by hand.