How it works
The formatter reads your text with a strict JSON parser, then writes the same content back with new spacing. Pretty output puts each array item and object member on its own line, indented by 2 spaces, 4 spaces or a tab. Minified output removes every space outside strings. Nothing else changes: numbers, escapes, key order and duplicate keys come out as you typed them. If the text is not valid JSON, the page shows the line and column of the first problem. Large input is formatted after you stop typing for a moment, so a big paste does not freeze the page.
pretty = every array item and object member on its own line, indented per level
minified = the same tokens with no whitespace outside strings
Worked example
Example input, not real data: { "a" : "x y" , "b" : [ ] }
- 1Minify the first example{ "a" : "x y" , "b" : [ ] } = {"a":"x y","b":[]}
- 2Find the error in a second example{"a":1,} = Line 1, column 8: Unexpected character "}"