input.json · editing
output.json · 2-space
Repair fixes single quotes, unquoted keys, trailing commas, Python literals, and more.

Related

Guides for JSON Fix

All guides →

Smart JSON Formatter for broken JSON

A regular JSON formatter only works after the input is already valid. fixjson.org is a JSON formatter with auto fix: it repairs common syntax errors first, then formats the cleaned JSON with readable indentation. Use it to format invalid JSON online when the payload came from logs, an API response, a hand-edited config, or AI output.

The same tool is also a json beautifier, json prettifier, json tidy online, json decoder, and json object formatter — different names for one operation: parse, repair, and re-emit with indentation. Whether you call it prettify json, json beautify, code formatter, or code beautification, the output is the same: strict, formatted JSON in the standard json file format.

Formatting and validation belong together. Before it prints anything, fixjson runs a json validator over your text, so the tool doubles as a json checker and a json verify step — if the json syntax is wrong, you see exactly where it breaks. Paste a raw json string, fix json that refuses to parse, and read the result in a clean json viewer (jsonviewer) layout. The same site links a json object viewer and a json view mode for inspecting nested key value pairs, instead of scanning one long unbroken line.

When the parse fails, the repair step takes over. This is the json repair path people search for as fix json, json fix, json correct, correct json, or simply fixjson. It rewrites the broken parts into valid JSON and hands them back, turning a failed json validator run into a clean one — no upload, no account.

Most of these errors come from treating JSON like JavaScript. The json vs javascript (json vs js) distinction matters: JSON has no comments, no trailing commas, no single quotes, and no bare keys. The repair step rewrites each of these back into correct json so a strict parser accepts it.

  • Single quotes — converts 'value' to "value"
  • Missing quotes in JSON keys — wraps bare identifiers like { name: "Ada" } in double quotes
  • Trailing commas — repairs trailing commas in JSON before } or ]
  • Unexpected token errors — cleans the common json syntax mistakes behind many JSON parser failures
  • Python literals — replaces True, False, None with their JSON equivalents
  • JavaScript comments — strips // line comments and /* */ block comments
  • Markdown code fences — strips leading ````json` and trailing ````` wrappers from LLM output
  • Hex numbers — converts 0xFF to decimal