Format & validation

JSON Repair

Fix broken JSON — trailing commas, single quotes, comments, unquoted keys, and files cut off mid-write.

Broken JSON

Settings

Output

Result appears here after you select

{ } How to use

  1. Paste the JSON that will not parse.
  2. Select Process. The summary lists every kind of problem that was fixed.
  3. Check the result, then copy or download it.

{ } How it works

JSON Repair works on the text you provide. Adjust the options, then select Process ▸ and it runs entirely in your browser — nothing is uploaded to a server — then shows the result in the Output panel.

Inputs

  • Broken JSON — paste or type your input in the left panel (use Sample for an example)
  • Indentation — choose one — Minified, 2 spaces, 4 spaces (default: 2 spaces)

Output

JSON — copy it, download it, or switch the Output panel to Tree view to explore it.

{ } Common uses

  • Rescue a config file that a hand edit left with a trailing comma.
  • Turn a JavaScript object literal — single quotes, unquoted keys — into real JSON.
  • Strip the comments out of a JSONC or tsconfig-style file so a strict parser accepts it.
  • Recover what you can from a log or download that was truncated part-way through.

{ } Limitations

  • Repair infers what was meant. It is right about commas and quotes, and it is guessing about anything more unusual — read the result before relying on it.
  • A truncated file has its brackets closed so it parses, but the data that was never written is gone. Nothing can bring that back.

{ } FAQ

Is my data uploaded to a server?

No. Everything runs locally in your browser — your files never leave your device.

Can I process more than one file at once?

This tool works on one input at a time.

Is this tool free?

Yes — it’s completely free and needs no sign-up.

What exactly does it fix?

Trailing commas, single and smart quotes, unquoted keys, // and /* */ comments, NaN, Infinity and undefined, Python’s True/False/None, raw line breaks and tabs inside strings, a stray byte-order mark, and brackets left open by a truncated file.

Will it break the text inside my strings?

No. It reads the document character by character and tracks whether it is inside a string, so a // in a URL or a brace in a sentence is left exactly as it is. That is why this is not a set of find-and-replace rules — those would quietly corrupt exactly this kind of content.

Is my data uploaded?

No. The repair happens in your browser, which matters here because broken JSON is often a config file or an API response with credentials in it.