JSON Repair
Paste JSON with common mistakes — trailing commas, single-quoted strings, unquoted keys, comments, or Python-style True/False/None — and fix it automatically. Runs entirely in your browser.
How to use it
Paste the malformed JSON and click Repair. The tool strips comments, converts single quotes to double quotes, adds quotes around unquoted keys, removes trailing commas, and normalizes True/False/None/NaN/Infinity to valid JSON. If the result is still invalid, the remaining parse error is shown so you know what to fix by hand.
Frequently Asked Questions
What kinds of errors can this fix?
Syntax-level issues common in JS object literals, JSON5, or Python dict dumps: trailing commas, single quotes, unquoted keys, // and /* */ comments, and True/False/None/NaN/Infinity literals.
Can it fix mismatched brackets or missing commas?
No — structural errors like an unclosed { or a missing comma between fields can't be fixed automatically without guessing intent. Those are reported as a parse error after the safe fixes are applied.
Is this the same as JSON5?
The accepted input is similar to JSON5/JSONC, but the output is always strict, standard JSON — safe to use anywhere a JSON parser is expected.