JSON Fixer — Repair Invalid JSON Online
- This tool runs entirely in your browser. Nothing you enter or upload is sent to a server.
Input
Tab indents · Shift+Tab outdents · Esc then Tab moves on
Your formatted JSON shows up here
Paste or type on the left, upload a file, or drop one onto the input.
JSON & data
About this tool
JSON that is slightly wrong is a daily annoyance: a trailing comma left in by hand, single quotes copied from a JavaScript object, a comment in a config file, a Python dict printed with True and None, or a response that was cut off before the closing brackets. The JSON fixer opens with Repair already switched on, so you can paste the text and see valid JSON straight away.
It handles the usual mistakes: trailing commas, single-quoted strings, unquoted keys, // and /* */ comments, Python and JavaScript literals (True, False, None, undefined), NaN and Infinity (replaced with null, since JSON has no such values), raw line breaks or tabs inside strings, numbers such as +1, .5, 5. or 007, and brackets or braces left open at the end. Each repair is listed under the result with a count, so you can see exactly what was changed and decide whether you trust it. Nothing is guessed silently.
Repair is deliberately careful. Valid JSON is never altered, and numbers and strings come back as written. Note that Repair accepts things a strict parser would reject, so use it to rescue and understand data, then fix the source. If you only want to check that something is strictly valid, switch Repair off and the tool reports the first error with its line and column, plus a plain explanation.
The result can be beautified, minified, sorted or browsed as a tree, and everything runs in your browser.
Frequently asked questions
What can the JSON fixer repair?
Trailing commas, single quotes, unquoted keys, comments, True, False, None and undefined, NaN and Infinity, raw line breaks inside strings, unusual number formats and unclosed brackets or braces. Each fix is listed beneath the result.
Will it change JSON that is already valid?
No. Valid JSON is never altered by Repair; only whitespace is adjusted by the formatting options you choose.
Can it fix any broken JSON?
No. It fixes common, well-defined mistakes. If the text was cut off, the missing closing brackets can be added, but data that was lost cannot be recovered, and NaN or Infinity can only be replaced with null.
Why should I still fix the source?
Repair accepts things strict parsers reject. Other tools and APIs will still refuse the original, so correct it where it is produced.
How do I check JSON strictly?
Turn Repair off. The tool then reports the first error with its line and column and explains what is wrong.
Is my JSON uploaded anywhere?
No. Everything runs in your browser and nothing is sent to a server, so API responses, tokens and customer records stay on your device. A share link carries the JSON in the part of the address after the #, which browsers never send to a server, but anyone who has the link can read it.