Format or validate JSON
Pretty-print or minify JSON with your choice of indent, and get a clear error with line and column if it doesn't parse.
JSON is parsed and formatted on your device. Nothing is uploaded to our servers.
Fullscreen
Indent
01
Paste your JSON
Validity is checked as you type.
02
Pick pretty-print or minify
Choose the indent width for pretty-print, or collapse it to one line.
03
Copy the result
Or fix the error shown. It points to the line and column, when the browser reports one.
Frequently asked
Is my JSON sent anywhere?
No. Parsing and formatting both happen in your browser using the built-in JSON parser.
How accurate is the error location?
It comes from the browser's own JSON parser, which reports a character position on a syntax error. That's converted to a line and column here. Most browsers support this, but the exact wording of the underlying error can vary.
Does minify preserve key order?
Yes. Parsing and re-serializing doesn't reorder object keys.
Does this work offline?
Yes, once the page has loaded.