JSON Formatter

Pretty-print, minify, and validate JSON — with the exact error location.

Popular toolCompress an imageShrink JPG & PNG file sizes without the quality tax.Open

Waiting for input…

How to format JSON

Paste your JSON into the box. Click Format to pretty-print it with consistent indentation, or Minify to strip every space and newline into one compact line. The result appears below, ready to copy.

Reading validation errors

If the JSON can't be parsed, the tool shows the parser's message and the approximate position of the problem. Fix that spot and re-run — well-formed JSON formats instantly.

Questions

Is my JSON sent to a server?
No. Parsing, formatting, and validation all run in your browser with the built-in JSON parser. Your data never leaves the page, so it's safe for config files and API responses you'd rather not paste online.
What happens when my JSON is invalid?
Instead of a blank result you get a clear message with the error and, where the browser reports it, the line and column where parsing failed — so you can jump straight to the stray comma or missing brace.