JSON Repair

Runs locally in your browser

Fix broken JSON from LLMs, logs and JavaScript objects

Malformed JSON

Paste malformed JSON or load an example to repair it.
What JSON Repair does

JSON Repair turns almost-JSON into strict, parse-valid JSON. It is built for text copied from LLM chats, logs, JavaScript or Python sources and hand-edited files: single quotes, unquoted keys, comments, trailing or missing commas, True/False/None, Markdown code fences with surrounding chat text, and responses that stop mid-way. Repairs come from the deterministic jsonrepair library, and every result is checked with JSON.parse before it is shown.

How to use
  1. 1.Paste the broken text, upload or drop one .json file, or load an example.
  2. 2.The output updates as you type; for inputs over 2 MB select Repair JSON to run it.
  3. 3.Choose 2 spaces, 4 spaces, tabs or compact output.
  4. 4.Read the repair report and use Show in input to jump to each changed place.
  5. 5.Copy the result or download it as repaired.json.
What the report tells you

The report only lists facts the tool observed: whether a code fence or surrounding prose was removed, whether the input was already valid, how many non-whitespace characters were added or removed, and where each change happened in your input. It never invents a count of "fixes". Valid JSON is only re-indented, and number tokens such as 9007199254740993 or 0.10000000000000000001 are copied exactly, so nothing is rounded.

Limits, review and privacy

Repair is heuristic: a truncated value is closed where the text stops, a missing comma is inserted where it seems most likely, and unquoted text may become a string. Review important data before using it in production. Text that is not JSON-like at all is reported instead of being wrapped into a string, and the change list is skipped above 100 KB to keep the page responsive. Everything runs in your browser; the input is never uploaded.

CodingTool is officially live on

Launched on StartupBaseCodingTool.dev - Free, Fast & Easy Developer Tools in One Place | Product HuntCodingTool - Featured on Startup FameFazier badgeListed on Turbo0Featured on Twelve ToolsFeatured on Findly.tools