Format, validate and minify JSON in your browser. Pick 2-space, 4-space or tab indentation, sort keys, and get exact line and column numbers for errors.
How JSON formatting works
The formatter parses your text with the browser's native JSON parser, then re-serialises it with the indentation you choose. Parsing catches syntax errors — a missing comma, a trailing bracket, an unquoted key — and reports the line and column so you can fix it fast. Minify strips all whitespace for the smallest payload; sort keys orders object properties alphabetically for stable diffs.
JSON.stringify(JSON.parse(input), null, 2)Frequently asked questions
Is my JSON uploaded anywhere?
No. Parsing and formatting run entirely in your browser with the native JSON engine. Nothing you paste is sent to a server, logged or stored.
What do the line and column numbers in errors mean?
They point at the character where the parser first failed — usually just after the real mistake, like the line following a missing comma. Check the character at that position and the one just before it.
When should I minify instead of beautify?
Beautify (2 or 4 spaces) for reading, code review and diffs. Minify when the JSON ships over the network or gets embedded in a config where size matters — it is byte-for-byte the same data.
Last updated: 7 July 2026
More tools
Runs entirely in your browser — nothing you enter is uploaded. DevMint · MintKit