JSON Repair
Paste JSON that won't load — an extra comma, the wrong quotes, a comment, or text that stops halfway. We fix it in your browser and show you exactly what changed.
A free way to fix JSON that a parser rejects, without sending it to a server.
What it fixes
- • A leftover comma after the last item in a list
- • Names and text wrapped in
'single quotes', or left unquoted altogether - • Comments written as
//or/* */ - • Text that stops halfway — the missing closing brackets are added back
- • A before-and-after view, so you can see every change before you trust it
Example: "almost valid" JSON
This is what an AI model or a hand-edited config often gives you. A computer rejects it, but you can still tell what was meant:
{
name: 'Ada Lovelace',
roles: ['admin', 'editor',],
// added this year
active: true,
}JSON Repair puts the quotes right, removes the extra comma and the comment, and shows you each change it made.
Why this comes up so often
AI models asked for JSON often add a stray comma or a comment, or stop halfway through. Hand-written config files often use JavaScript style rather than strict JSON. This tool is built for those near-misses rather than for every possible format. We never see your data — the repair happens in your browser.
After it's repaired
Once your JSON is valid, open it in the JSON Viewer to browse it as a tree, or in JSON Diff to compare it against a known-good version.
FAQ
Can it fix any broken JSON?
It handles the usual culprits — extra commas, missing or wrong quotes, comments, and text that stops halfway. Badly mangled input may be beyond saving, but the before-and-after view always shows what changed, so you can check the result yourself.
Is my data sent to a server to be repaired?
No — We never see your data. Repair logic runs locally in your browser.
Does it work well on LLM output?
Yes — that is one of the main reasons people use it. Model replies meant to be JSON often carry an extra comma or stop partway through.