JSON Minifier

Compress JSON to its smallest valid form. Paste formatted JSON below and the minifier strips every unnecessary space and line break — and shows you the size saved.

json-minifier · runs locally

What this JSON minifier does

A JSON minifier (also called a JSON compressor) removes every byte of whitespace that is not required by the JSON specification. Formatted JSON is great while you are reading or editing it, but all those spaces and newlines are dead weight once the document is sent over a network, stored in a database column, or embedded in a config value. This tool parses your input and re-serializes it with zero indentation — the smallest valid representation of the same data.

The size readout tells you the exact byte count before and after, using the real UTF-8 encoded size rather than character count, so the savings you see are the savings you get on the wire.

How to minify JSON online

  1. Paste formatted or hand-written JSON into the input box.
  2. Click Minify JSON.
  3. Check the byte savings shown next to the button.
  4. Copy the single-line result wherever you need it.

When to minify — and when not to

Minify JSON that machines consume: API responses, payloads for HTTP requests, values stored in caches or environment variables, and fixtures bundled with an app. Keep JSON human-formatted when people maintain it — configuration files in a repository, documentation examples, and test data under code review. Since minifying requires a successful parse, the tool also doubles as a quick validity check; for detailed error positions, use the JSON Validator.

Frequently asked questions

What does minifying JSON actually remove?

Only insignificant whitespace: spaces, tabs and line breaks between tokens. Keys, values and structure are untouched, so minified JSON is byte-for-byte smaller but semantically identical to the original.

How much smaller does minified JSON get?

It depends on how heavily the input was formatted. Typical pretty-printed API responses shrink by 15–40%. Deeply nested documents with 4-space indentation can shrink even more, because every nesting level multiplies the leading whitespace.

Does minifying JSON improve performance?

For payloads sent over the network, yes — fewer bytes means faster transfer and lower bandwidth costs, which is why production APIs serve minified JSON. Parsing speed is essentially unaffected, since whitespace is skipped in either case.

Can I un-minify JSON again?

Yes. Minification is fully reversible in terms of readability: paste the minified output into the JSON Formatter on this site and it will pretty-print it back with the indentation of your choice.