JSON Minifier

Strip every unnecessary space and line break, and see how many bytes you saved.

runs in your browserno uploadno sign-up

Paste JSON or load the sample to start.

Minified

Output appears here as you type.

What minifying removes

JSON allows spaces, tabs and line breaks between tokens purely for readability. Minifying removes all of them, leaving the smallest valid text for the same data. Whitespace inside strings is part of the value and is kept.

Minified JSON is what you want in HTTP responses, environment variables, query strings and fixtures that no one reads by hand. For responses served over the web, gzip or Brotli compression recovers most of the whitespace anyway, so the biggest wins are in places without compression: localStorage, cookies, database columns and log lines.

Frequently asked questions

Does minifying JSON lose any data?

No. Only whitespace outside strings is removed. The minified output parses to exactly the same value.

How much smaller does JSON get?

It depends on how deeply nested and indented it was. Pretty-printed API responses commonly shrink by 20–40%; the counter shows your exact saving in bytes (UTF-8).

Can I reverse minification?

Yes — paste the minified JSON into the formatter to indent it again. Nothing is lost except the original indentation style.

Is minifying the same as compressing?

No. Minifying makes the text shorter but still readable by any JSON parser. Compression (gzip, Brotli) produces binary data that must be decompressed first. They work well together.