JSON Error Fixer – Repair Invalid JSON

Fix broken JSON online. The fixer repairs common mistakes, lists every change it made, and shows the original and corrected JSON side by side.

JSON input

1

Corrected JSON

Waiting for input

About this tool

Most invalid JSON is broken in a small number of predictable ways, often because it was copied from code, a log or a JavaScript or Python object. This tool applies the usual repairs and tells you exactly what it changed and on which line, so you can check each fix instead of trusting it blindly.

Mistakes the fixer handles

Each one is detected and reported with its line number.

{'a': 1}                   ->  {"a": 1}             single quotes
{a: 1}                     ->  {"a": 1}             unquoted key
{"a": 1,}                  ->  {"a": 1}             trailing comma
{"a": 1 "b": 2}            ->  {"a": 1, "b": 2}     missing comma
{"a": True}                ->  {"a": true}          Python value
{"a": [1, 2}               ->  {"a": [1, 2]}        missing bracket
{"a": 1} // note           ->  {"a": 1}             comment removed

Why review the fixes

Automatic repair is a best guess. For example, a missing comma is easy to place, but a missing closing bracket could belong at several positions. Read the list, check the corrected output, and use Undo if a fix is not what you meant.

How to use it

  1. Paste the broken JSON in the left box.
  2. The corrected version appears on the right, and each fix is listed below with its line number. Click a fix to see where it was.
  3. Press Apply fixes to replace your input with the corrected JSON, or Undo to go back.

Frequently asked questions

What can it fix?

Missing and trailing commas, single and smart quotes, unquoted keys and values, comments, Python True, False and None, undefined and NaN, invalid escape sequences, raw line breaks in strings, and missing closing brackets or quotes.

Can it always repair my JSON?

No. Where the intent is unclear, such as an unterminated string that swallows the rest of the file, it may guess wrong or give up. Always review the list of fixes.

Is my data uploaded?

No. The repair runs in your browser.

Need something simpler? Try the JSON Validator or the JSON Formatter on jsonchecker.in.

More advanced tools

Basic JSON tools on jsonchecker.in