Tool

JSON Formatter

Paste messy or invalid JSON and intelligently repair it into a clean, readable structure.

✓ Valid JSON

Second JSON

About the JSON Formatter

This JSON Formatter takes whatever JSON you throw at it — pasted from an API log, copied out of a config file, or half-broken after a stray comma — and turns it into something you can actually read. All the parsing and repairing happens right here in your browser tab, so the content you paste never leaves your device or reaches a server. Use it when a response is too dense to skim, when a payload won't parse and you can't tell why, or when you just need a tidy, indented copy for documentation or debugging.

Things you can do here

  • Format — reindent valid JSON into a readable, properly nested layout.
  • Validate — confirm the structure parses correctly before you pass it along elsewhere.
  • Minify — strip whitespace and collapse it to one line for shipping in production payloads.
  • Repair — patch up typical mistakes: unquoted keys, single quotes, trailing commas, stray comments, Python-style `True`/`False`/`None`, and unclosed brackets.
  • Tree View — browse the result as an expandable tree instead of raw text, drilling into keys and arrays one at a time.
  • Compare — line up your original input against the formatted result to spot exactly what changed.
  • Collapse & expand sections — fold individual braces or brackets with the +/- toggle, or use Open All / Close All for the whole document at once.
  • Copy & Download — grab the formatted JSON on your clipboard or save it straight to a .json file.

How to use the JSON Formatter

  1. Paste JSON into the editor.
  2. Format or repair the input, then review the result.
  3. Use validate or minify when you need a specific output shape.
Example: {"name":"Ada","active":true}

JSON Formatter FAQ

Can this formatter repair invalid JSON?

It can repair several common mistakes, but always review repaired output before using it in an application.