What does the JSON Repair & Auto-fix do?
JSON Repair fixes broken JSON automatically. It converts single quotes to double quotes, quotes bare keys, removes trailing commas and comments, replaces Python True, False and None, adds missing commas and closes open brackets, then shows a list of every change it made.
How to use the JSON Repair & Auto-fix
- Paste the broken JSON into the left pane. The repaired JSON appears on the right straight away.
- Read the Fixes table to see what was changed and on which lines.
- Turn rule chips on or off if you only want certain kinds of fix. Strict mode avoids guesses such as adding missing brackets.
- Copy the repaired JSON or download it.
When it helps
- Cleaning JSON copied from logs, chats or documentation
- Fixing output from scripts and language models
- Converting JavaScript or Python object literals to real JSON
Frequently asked questions
How do I fix invalid JSON?
Paste it into the repair tool. It fixes the common mistakes automatically and lists each change, so you can check them before using the result.
What kinds of errors can it fix?
Single quotes, smart quotes, unquoted keys, trailing and missing commas, comments, Python True, False and None, JavaScript undefined and NaN, markdown code fences and unclosed brackets.
Can a repair change my data?
Repairs only change syntax. In Lenient mode some fixes are guesses, such as closing brackets at the end, so each fix is listed. Use Strict mode to turn guessing off.
Is my JSON sent to a server?
No. The repair runs in your browser and nothing is uploaded.