Validate & Format · Runs in your browser

JSON Repair

Fix broken JSON automatically: unquoted keys, single quotes, trailing commas, comments, Python True/None, missing brackets and the code fences around ChatGPT replies.

Broken JSON
Drop a file to load it
Repaired JSON
Waiting for input

How to use it

  1. Paste the broken JSON — a JavaScript object, a Python dict, a truncated response or an LLM reply.
  2. The repaired JSON appears on the right, and the status bar lists every fix that was made.
  3. Check the fixes, then copy or download valid JSON.

What gets fixed

Single or smart quotes, unquoted keys, trailing and missing commas, // and /* */ comments, True/False/None, NaN and undefined, unescaped line breaks in strings, and missing closing brackets.

LLM output

Text around the JSON (“Sure! Here is…”) and ```json fences are removed, so you can paste a chatbot reply as-is.

Nothing silent

Each change is reported with its position. Repair is a best guess — review the list before relying on the result for anything important.