Skip to content
jsonforge.app

JSON Repair

Automatically fix broken JSON — trailing commas, single quotes, unquoted keys.

Broken JSON

Loading editor…

Repaired output

Paste broken JSON on the left to repair it.

What is JSON Repair?

A JSON repair tool automatically fixes the malformed JSON that shows up constantly in the real world — a trailing comma left after deleting the last property, single quotes instead of double quotes, unquoted object keys, missing commas between array items, or even JavaScript-style comments left in from a config file — and turns it into standards-compliant, parseable JSON. Unlike a strict formatter (which only re-indents input that already parses), a repair tool tolerates the common mistakes people and legacy systems actually produce, applies the minimal set of corrections needed to make the document valid, and hands back clean, pretty-printed output. It's the difference between a tool that tells you "line 4, unexpected token" and one that just fixes line 4 for you.

How to use JSON Repair

  1. Paste or type the broken JSON into the left panel — or drag a .json file onto it.
  2. The repaired, pretty-printed result appears automatically on the right.
  3. A badge above the output tells you whether anything was actually repaired, or if your input was already valid JSON.
  4. Copy the repaired JSON with the copy button once you're happy with the result.

Examples

Trailing comma + unquoted keys

Input

{name: 'Ada', active: true,}

Output

{ "name": "Ada", "active": true }

Missing comma between array items

Input

["a" "b" "c"]

Output

[ "a", "b", "c" ]

Common mistakes

  • Assuming a repair tool can fix any input — severely truncated or ambiguously nested JSON still can't be recovered safely.
  • Not noticing the 'already valid' badge and assuming your input must have had an error just because you ran it through a repair tool.
  • Using this instead of the JSON Formatter's validator when you actually want to know the exact line/column of a syntax error, not have it silently fixed.

Why use this tool

  • Runs entirely client-side — broken JSON containing tokens, config values, or other sensitive data never leaves your browser.
  • Fixes the syntax mistakes people actually make (trailing commas, single quotes, unquoted keys) instead of just reporting them.
  • Faster than manually hunting for a missing comma or mismatched bracket in a large document.

Frequently asked questions