broken JSON
repaired JSON

    

What JSON Repair can fix

JSON is strict, so one small mistake makes JSON.parse fail. This tool reads the text the way a forgiving parser would, then writes it back out as valid JSON. It can fix:

How to use it

Paste the broken JSON into the left box and press Repair JSON. The fixed JSON appears on the right, with a list of what was changed. Copy it or download it as a .json file. Always take a quick look at the result before you use it, because the tool repairs syntax and cannot know what you meant.

Example

Broken input:

{name: 'Ali', "age": 24, "active": True, "skills": ["js", "python",],}

Repaired output:

{
  "name": "Ali",
  "age": 24,
  "active": true,
  "skills": [
    "js",
    "python"
  ]
}

Here the key was quoted, the single quotes were replaced, True became true, and both trailing commas were removed.

Frequently asked questions

Why does ChatGPT or Claude sometimes return invalid JSON?

AI models write text, and nothing forces that text to be valid JSON unless you use a structured output feature. Common problems are a markdown code fence around the JSON, a sentence before or after it, trailing commas, comments and single quotes.

Will the tool change my data?

It only fixes syntax. Values, key order and numbers are kept as they are. It cannot guess missing values, and a few fixes, such as unescaped quotes inside strings, are best guesses, so check the result.

Can it fix JSON that was cut off?

If the text stops after a complete value, it adds the missing closing brackets and braces. If it stops in the middle of a string or right after a colon, there is nothing sensible to recover, and the tool tells you where it got stuck.

What if it cannot repair my input?

You will see the position where it stopped. Fix that spot by hand, or paste the text into the JSON Formatter to find the exact syntax error. Our guide to common JSON parse errors explains what each message means.

Is my JSON uploaded to a server?

No. The repair runs in your browser with JavaScript. Nothing you paste is sent anywhere.

If the JSON is already valid, what happens?

The tool tells you it was already valid and just formats it with the indentation you chose.

Related tools

Format and validate the result with the JSON Formatter. See what the repair changed with JSON Diff. Put JSON inside a string with JSON Escape and Unescape. Read the guide to JSON parse errors.

Ad placement — in-content (below tool, above footer)