JSON Formatter

Pretty-print, minify and validate JSON with precise error locations. Free, runs entirely in your browser — your files are never uploaded.

How to use JSON Formatter

  1. Paste your JSON in.
  2. Format it for reading, or minify it for transport.
  3. If it is invalid, jump to the line and column the problem is on.

Frequently asked questions

Is my JSON sent to a server?
No. Parsing and formatting happen in your browser, which matters when the payload you are debugging contains tokens, customer records or anything else you would not paste into a stranger’s form.
Why do other formatters not tell me where the error is?
Because they report what the JavaScript engine says, and the engine omits a position for the most common failure, "Unexpected token". This tool scans the document itself, so it can point at the exact line and column in the case that actually comes up.
Can I trust it to agree with a real parser?
It is differential-tested against the browser’s own JSON.parse across a hand-written corpus and thousands of fuzzed mutations, agreeing on validity for every input.
What are trailing commas and comments?
Both are invalid in strict JSON and are among the most frequent causes of a file that looks fine but will not parse. They are flagged with a position rather than a general complaint.