JSON Formatter & Validator
Paste JSON below to format, minify, or validate it — invalid JSON gets a precise line and column, not just "unexpected token." Runs entirely in your browser; nothing you paste is sent anywhere.
Frequently asked questions
Does this validate against the official JSON spec?
Yes — it uses the browser's own built-in JSON parser
(JSON.parse), the same one your code would use, so
anything that's valid or invalid here is valid or invalid everywhere
that parser is used. It won't accept JSON5 or JSONC extras like
trailing commas or comments, since those aren't standard JSON.
What does "sort keys" actually sort?
Object keys, alphabetically, at every level of nesting. Array order is always left alone — arrays are ordered data, and reordering them would change what the JSON means.
Is my data uploaded anywhere?
No. Formatting, validation, and minifying all happen locally in your browser — nothing you paste here is sent to a server, which makes this safe to use on data you wouldn't want to paste into a random website.
What's the difference between formatting and minifying?
Formatting adds indentation and line breaks to make JSON easy for a person to read. Minifying strips all of that out to make the file as small as possible — the same data, just optimized for a computer to transmit or store rather than for a person to read.