JSON Prettify vs Minify

Free JSON prettify vs minify tool. Paste JSON and see it pretty-printed and minified side by side, with the exact character savings from minification. Runs in your browser.

Paste JSON to see it pretty and minified.

How json prettify vs minify works

The tool parses your JSON once and re-serializes it two ways: pretty-printed with your chosen indentation, and minified to a single line with all whitespace removed. Both are displayed at once so you can compare the human-readable and wire-optimized forms of the same document.

Minification removes the spaces, newlines and indentation that make JSON readable but add bytes. For API payloads this can measurably reduce transfer size. The tool reports the exact character savings and the percentage reduction so you can judge whether minification is worth it for your document.

If the input is not valid JSON, the tool reports the parser error without producing partial output, so you never copy a broken result. The indent is configurable for the pretty form.

Frequently asked questions

How is this different from the JSON formatter?
The JSON formatter only pretty-prints. This tool shows pretty and minified side by side and reports the byte savings, which helps you decide whether to ship the compact form.
Does minification change my data?
No. Both forms are produced by parsing then re-serializing the same parsed object, so the data is identical — only whitespace differs.
What indent can I use?
Any positive whole number of spaces. The default is 2, which matches the most common style guide.
Is my JSON sent anywhere?
No. Parsing and serialization happen in your browser; nothing is uploaded.