JSON Fixer & Repair Tool
This JSON fixer repairs the mistakes that actually occur in hand-edited and log-captured JSON: comments, single quotes, curly quotes from a word processor, unquoted keys, trailing commas before a closing bracket, and Python or JavaScript literals such as None, True and undefined. The repairs are made by a scanner that tracks whether it is currently inside a string, which is what makes them safe — a comma, a double slash or a brace inside a string literal is data, and a regex-based fixer would corrupt it. Every change made is listed, so you can see exactly what was altered rather than trusting a black box.
How it works
Repairs the mistakes that actually occur in hand-edited and log-captured JSON: comments, single quotes, curly quotes, unquoted keys, trailing commas, and Python or JavaScript literals such as None, True and undefined.
The repairs are made by a scanner that tracks whether it is inside a string, so a comma, a double slash or a brace inside a string literal is treated as data rather than as syntax. Every change made is listed underneath.
Everything runs in your browser — nothing you paste is sent to a server.
⚠Nothing to parse yet.
⚠ Some problems were repaired but the result still does not parse: Nothing to parse yet.. That usually means a bracket or brace is missing, which cannot be guessed at safely.
What gets repaired
- Comments — both
//and/* */, common in config files. - Single quotes — valid in JavaScript, not in JSON.
- Curly quotes — inserted automatically when JSON passes through a word processor or chat app.
- Unquoted keys — valid JavaScript object syntax, not valid JSON.
- Trailing commas — the single most common cause of a parse failure.
- Python and JavaScript literals —
None,True,False,undefined,NaN. - A byte order mark before the opening brace.
Why a scanner and not a regex
Consider {"url": "https://example.com//path"}. A regex that strips // comments destroys
that URL. Or {"note": "a, b,"} — a trailing-comma regex mangles the value.
The scanner here tracks string state character by character, so everything inside quotes is untouched. That is the difference between a repair you can trust and one that quietly corrupts your data.
What it will not guess
A missing closing brace could belong in several places, each producing different but equally valid-looking JSON. Rather than pick one, the tool reports that the result still does not parse and tells you why.
Frequently asked questions
What can it fix?
Comments, single and curly quotes, unquoted keys, trailing commas, and Python or JavaScript literals like None, True, False, undefined and NaN.
Will it damage my string contents?
No. A scanner tracks whether it is inside a string, so a comma, a double slash or a brace inside a string literal is treated as data and left alone. That is the main thing a regex-based fixer gets wrong.
What can it not fix?
A missing bracket or brace. Guessing where a structure was meant to close would produce plausible but wrong data, so those are reported rather than repaired.
Why does JSON not allow comments?
It was deliberately left out so that JSON would remain a pure data format. Configuration files want comments anyway, which is why so many of them are technically invalid JSON.
Does it change my data?
Only its syntax. Values are preserved exactly, apart from Python and JavaScript literals which are mapped to their JSON equivalents.
Is my data uploaded?
No. The repair runs entirely in your browser.
Related tools
JSON Validator
This JSON validator checks syntax instantly and pinpoints the exact line and column of any error.
JSON Formatter & Beautifier
This JSON formatter beautifies minified or messy JSON online with clean indentation, line numbers, and code folding.
JSON5 Formatter & Validator
This JSON5 tool validates the relaxed syntax and converts it to strict JSON.