JSON Repair

Fixes broken JSON: unquoted keys, trailing commas, single quotes.

JSON Repair fixes broken or invalid JSON and returns clean, pretty-printed output. It automatically corrects common mistakes like unquoted keys, trailing commas, and single quotes, then re-formats the result with 2-space indentation. It is useful when you paste in malformed JSON from a log, an API response, or a config file and need valid JSON back quickly.

Common uses

  • Recover JSON copied from logs or terminals where keys are unquoted
  • Remove trailing commas left after editing arrays or objects by hand
  • Convert single-quoted strings and keys into valid double-quoted JSON
  • Clean up JavaScript-style object literals into strict JSON
  • Quickly re-indent and validate a messy JSON snippet before using it

FAQ

Is my data sent to a server?

No. JSON Repair runs entirely in your browser and nothing is uploaded. Your input never leaves your device.

What kinds of problems can it fix?

It repairs common JSON mistakes such as unquoted keys, trailing commas, and single quotes used instead of double quotes. After repairing, it parses the result and re-formats it as valid, indented JSON.

How is the output formatted?

The repaired JSON is pretty-printed with 2-space indentation. Even if your input was minified or messy, the output is consistently formatted.

What happens if the JSON is too broken to repair?

If the input cannot be repaired into valid JSON that parses, the tool reports an error instead of returning output. In that case you will need to fix the structural problems manually.

Does it change my data values?

No. It only fixes the JSON syntax so it becomes valid; the keys and values themselves are preserved, just reformatted.

Related tools

  • JSON Escape / Unescape
  • JSON Flatten
  • JSON Formatter
  • JSON Merge
  • JSON Minify
  • JSON Patch (RFC 6902)
  • JSONPath Evaluator
  • JSON Sort Keys