Skip to content

JSON Repair

JSON repair proposes valid JSON from malformed text using jsonrepair. It can handle common fences, comments, quoting mistakes, trailing commas and some truncated syntax.

Found a problem, or something that could be better? We read every message and we fix things quickly.

JSON repair proposes valid JSON from malformed text using jsonrepair. It can handle common fences, comments, quoting mistakes, trailing commas and some truncated syntax.

The result is parsed independently and shown with a bounded difference preview. Repair can change interpretation or complete missing syntax; it cannot recover absent facts, so review before using the output.

How to use

  1. Paste the malformed JSON while retaining your original copy.
  2. Run repair and compare removed and added text.
  3. Review the full result and download repaired.json.

Frequently asked questions

Can it recover a missing value?

No. A syntactic repair is not evidence of the intended data. Do not treat a completed document as recovery of facts that were never supplied.

Does it run pasted JavaScript?

No. The repair parser transforms text; the resulting JSON is passed to JSON.parse, not eval.

Why does valid JSON still show changes?

The result is normalized with two-space indentation. The difference can therefore include formatting rather than a syntax correction.

Is every malformed document repairable?

No. Ambiguous or unsupported input can fail. The original remains unchanged, and timed-out jobs do not expose stale output.

A proposal, not a truth check

A missing closing bracket may be straightforward to add; a malformed value can be ambiguous. Inspect important numbers, identifiers and null-like values against the source.

Successful JSON.parse proves syntax, not schema validity or factual correctness. Use a schema validator for a separate structural check.

Review and export limits

Input is capped at 1,000,000 characters and normalized output at 2,000,000. Difference computation has its own limit; the preview may be shortened while the complete result remains downloadable.

Removed, added and unchanged text are labelled in words as well as styled. Everything runs in a disposable local worker with cancellation.