Developer

JSON formatter

Paste JSON to format it with indentation, minify it to save space, or check that it is valid. The data is processed in your browser and never sent anywhere.

Runs locally in your browser

How it works

The input is parsed with the browser's own JSON parser, which is the same standard every language implements. Formatting re-serialises the parsed value with a chosen indentation; minifying does the same with no whitespace. Because parsing happens first, a syntax error is reported before anything is printed — with the position in the text where the parser stopped.

Worked example

The compact string {"a":1,"b":[true,null,"x"]} formats across four lines with two-space indentation, showing that b is an array of three items. Minifying it again returns byte-for-byte the same compact text, since whitespace outside strings carries no meaning.

Questions and answers

Everything runs in your browser: your text, file or value is never uploaded anywhere.