JSON WalletPrivacy-first JSON & API workspace

JSON Repair

Turn almost-JSON into valid JSON automatically.

← All tools

Opens the editor with a broken example on the left and its repaired form on the right. Runs entirely in your browser.

JSON repair takes text that is almost valid JSON — the kind you copy out of a log file, a JavaScript source file, or a chat message — and rewrites it into strict, parseable JSON. Instead of hunting for one missing bracket by hand, you paste the whole thing and get a corrected version you can actually parse.

What it fixes

  • Trailing commas after the last element of an object or array
  • Single quotes converted to the double quotes JSON requires
  • Unquoted keys from JavaScript object literals wrapped in quotes
  • Python literalsTrue, False, None — mapped to true, false, null
  • Missing brackets or braces balanced where the structure makes it unambiguous
  • Unescaped characters such as raw newlines inside strings

Repair is a first draft, not magic

Automatic repair is excellent at the mechanical mistakes above, but it cannot invent data that is genuinely missing or guess your intent when a document is deeply mangled. That is why the editor shows the original on the left and the repaired result on the right: you review the change before you trust it, rather than getting a silent rewrite. If a value truly cannot be recovered, the validator points you at the exact spot to fix by hand.

A safe place for sensitive payloads

Repair runs locally in your browser. Nothing is uploaded, so broken production responses full of tokens and personal data are safe to paste. Once repaired, you can format, minify, view as a tree, or diff the result against another document without leaving the page.

Frequently asked questions

Can this fix any broken JSON?

It fixes the common, mechanical problems — trailing commas, single quotes, unquoted keys, Python literals and unbalanced brackets. It cannot recover data that is genuinely missing, so you always review the repaired result before using it.

Is repairing JSON safe for private data?

Yes. The repair runs entirely in your browser and nothing is uploaded, so payloads containing secrets or personal data never leave your device.

What is the difference between repair and format?

Format only re-indents already-valid JSON. Repair rewrites invalid JSON into valid JSON. Repair first, then format the result if you want it pretty-printed.


Related tools

Prefer to start from scratch? Open the JSON editor and paste your own data — everything runs locally in your browser.

Press K for commands