JSON Repair — Fix Broken JSON
Fix common JSON errors: single quotes, trailing commas, unquoted keys.
Applied: converted single quotes to double quotes, quoted unquoted keys, removed trailing commas, converted Python True/False/None.
Fixes the usual suspects in LLM and hand-written JSON: code fences, single quotes, unquoted keys, trailing commas, smart quotes and Python True/False/None. Everything runs in your browser.
Paste malformed JSON and get it repaired and pretty-printed. It fixes the errors that break JSON in real life — Markdown code fences around the JSON, single quotes, unquoted keys, trailing commas, smart quotes, and Python-style True/False/None — and tells you exactly what it changed. Perfect for cleaning up JSON returned by language models or copied from loose configs. Runs in your browser.
How to use the JSON Repair
- Paste the broken JSON.
- Review the list of fixes that were applied.
- Copy the repaired, formatted JSON.
Frequently asked questions
What kinds of errors can it fix?
Markdown code fences, single-quoted strings and keys, unquoted object keys, trailing commas, curly 'smart' quotes, and Python literals (True/False/None). Each applied fix is listed.
Why does AI output produce invalid JSON?
Language models often wrap JSON in ```code fences```, use single quotes, or add trailing commas — small things that valid JSON forbids. This tool strips them automatically.
What if it still won't parse?
It shows a best-effort output plus the parser error so you can make a quick manual fix. Deeply malformed input may need hand-editing.