PocketPlay
中文

JSON Repair

Fix broken JSON — single quotes, trailing commas, unquoted keys, comments, Python literals and missing brackets — and see exactly what changed.

🔒 Runs in your browser — files never leave your deviceFree · No sign-up

Paste something on the left to repair it.

Broken JSON

Repaired JSON

What changed

No changes were needed.

0Fixes
0 BInput
0 BOutput

How to repair broken JSON

  1. Paste the JSON your parser rejects into the left box — or press Broken sample to see the tool at work.
  2. Press Repair (or tick Repair as I type); the fixed JSON appears on the right, formatted with the indent you choose.
  3. Read the What changed list to check every edit, then copy or download the result.

FAQ

What can it fix?

Single-quoted strings, curly “smart” quotes, unquoted keys, trailing commas, missing commas, JavaScript and hash comments, Python's True/False/None, NaN and undefined, strings concatenated with +, newline-delimited JSON, MongoDB-style values, and truncated documents whose brackets were never closed.

Will it change my data?

It only rewrites syntax, never values — and every edit is listed with its line number so you can verify it. When the input is already valid JSON the tool says so and returns it untouched.

Why did a repair fail?

Some damage is ambiguous: a half-written number, a string cut in the middle of an escape, or two documents glued together with no separator. The error message points at the exact line and column so you can patch that one spot by hand.