JSON Repair

Paste broken JSON — from a log, an LLM, a Python print or a JavaScript object — and get valid, formatted JSON back in one click.

Input · drop a file

Output

What gets fixed

  • Single quotes and unquoted keys → double-quoted strings.
  • Trailing commas and comments → removed.
  • Python True/False/None → true/false/null.
  • Missing closing brackets and braces at the end of a truncated document → added.
  • Concatenated or newline-delimited values, JSONP wrappers and Markdown code fences → unwrapped.

Repairs are rule-based (the open-source jsonrepair library) and happen in your browser. If the input is too damaged for the rules, the Fix with AI button on the JSON validator can take a smarter guess — always review the result.

Questions

Can repairing change my data?

It only changes syntax. But for a truncated document it can’t invent the missing values — it closes what was open, so the last item may be incomplete.

Why does my LLM output need repairing?

Language models often add trailing commas, comments or a Markdown fence around JSON. This tool removes all of those.

Related tools