Skip to content
jsonblocks

Free online JSON minifier

Compress JSON to a single line and see exactly how many bytes you save. This free JSON minifier removes unnecessary whitespace from parsed JSON - locally, in your browser.

Input

Valid JSON · 207 B

Minified

159 B · saved 23%
{"app":"jsonblocks","version":2.4,"darkMode":true,"retired":null,"owner":{"name":"Ada Lovelace","id":1024,"verified":true},"tags":["json","viewer","minifier"]}

Only whitespace outside strings is removed - your data stays byte-identical. Everything runs locally; nothing is uploaded.

How to minify JSON with jsonblocks

  1. Paste formatted JSON into the input panel or load the sample.

  2. Read the minified single-line output on the right.

  3. Check the savings readout to see bytes and percent saved.

  4. Copy the minified JSON for payloads, embeds, or config files.

Frequently asked questions

What does a JSON minifier do?

A JSON minifier removes all insignificant whitespace - line breaks, indentation, and spaces between tokens - producing the smallest valid representation of the same document. Parsers read it identically.

Will minifying change my data?

The tool parses and serializes JSON. It removes whitespace outside strings, but number representations and key ordering can change; integers outside the JavaScript safe range may lose precision. Keep the original when exact text or numeric precision matters.

When should I minify JSON?

Minify payloads sent over the network, JSON embedded in HTML or URLs, and size-constrained config. Keep the formatted original for editing - minified JSON is for machines, not humans.

How much smaller does minified JSON get?

Savings depend on indentation, nesting, and string content. The readout measures the actual UTF-8 bytes of your input and output; it is not a fixed percentage.

Why does my JSON fail to minify?

Minification requires valid JSON. Trailing commas, single quotes, and comments are the usual blockers - the validator pinpoints the exact line and column.

Minifier vs compressor: should I also gzip?

Do both. Minification shrinks the source; gzip or brotli compression on the server shrinks the transfer further. They stack: minified JSON compresses slightly better too.