JSON Repair – Fix Broken JSON Online
Paste broken JSON and repair it in one click. Missing commas, quotes, comments, brackets and more are fixed automatically.
Broken JSON
Repaired JSON
What Is a JSON Repair Tool?
A JSON repair tool takes JSON that will not parse and fixes the mistakes for you. Broken JSON often comes from copying JavaScript objects, Python output, log files or AI answers. Instead of hunting for one missing comma, paste it here and get valid JSON back.
How to Repair JSON
- Paste your broken JSON into the box, or click Sample to see an example.
- Click Repair JSON, or press Ctrl + Enter.
- Read the list of fixes that were made, then click Copy or Download.
What It Fixes
- Missing commas between values, and trailing commas before } or ].
- Missing colons, and = or , used instead of a colon.
- Single quotes and curly quotes, and keys without quotes.
- // and /* */ comments.
- Real line breaks and tabs inside strings.
- Python True, False and None.
- Missing closing quotes and missing } or ] at the end.
Text inside your strings is never changed. If something cannot be fixed safely, the broken line is marked in red so you can fix it by hand.
Example
{
name: 'Emily Clark',
"active": True,
"tags": ["json" "api",],
}{
"name": "Emily Clark",
"active": true,
"tags": [
"json",
"api"
]
}The tool reports exactly what it changed: Fixed 6 problems: quotes added around a key, single quote changed to double quote, True/False/None changed to true/false/null, missing comma added, trailing comma removed (×2).
Where Broken JSON Comes From
- JavaScript objects copied from code or the browser console have unquoted keys, single quotes and trailing commas.
- Python output from
print(dict)uses single quotes andTrue,False,None. Usejson.dumps()instead ofprint()to get real JSON. - AI chat answers often add comments, explanations or a missing bracket at the end.
- Log files and cut-off responses lose their last characters, so closing brackets are missing.
- Word processors and chat apps replace straight quotes with curly quotes (“ ”), which JSON does not accept.
Repair, Then Check
After repairing, read the list of fixes to make sure the result is what you meant, especially when a bracket was added at the end. Then explore the data in the JSON Viewer or check it against a schema with the JSON Schema Validator. To understand a specific error message, see Unexpected Token in JSON.
Frequently Asked Questions
What can the JSON repair tool fix?
It fixes missing or extra commas, missing colons, single or curly quotes, keys without quotes, // and /* */ comments, line breaks inside strings, Python True/False/None, missing quotes and missing closing brackets.
Will it change my data?
No. Text inside your strings is never changed, except that real line breaks and tabs are turned into \n and \t, which JSON requires.
What if the JSON cannot be repaired?
The tool shows the line and column where the problem is and highlights it, so you can fix the rest by hand.
Is my JSON sent to a server?
No. The repair runs in your browser. Your JSON stays on your device.