Developer

JSON Minifier

Strip insignificant whitespace from JSON to reduce payload size, with an honest account of how much it actually saves.

Need this built for your product?

We design, build & host secure software & APIs.

Talk to an engineer

What minifying removes

Only insignificant whitespace: the indentation, newlines and the space after colons and commas. Nothing inside a string is touched, key order is unchanged, and the parsed value is identical. It is the safest transformation in this whole category, because JSON has no construct where whitespace outside a string carries meaning.

The saving is smaller than it looks

Pretty-printed JSON is often 20 to 40 percent whitespace, so the raw reduction looks impressive. After gzip or Brotli, which every sensible server applies, the difference collapses to a few percent, because compression handles repeated whitespace extremely well. If your API is not compressing responses, enabling that achieves far more than minifying ever will. Check the Content-Encoding header before optimising anything else.

Where it still matters

Three cases. Payload size limits, where a hard ceiling on a request body or a message queue entry makes every byte count. Storage at volume, where millions of stored documents make the difference material. And embedded contexts such as a data attribute or a config blob inlined into a page, where the JSON sits inside something that is itself being counted.

Do not minify what humans edit

Configuration files are read and modified by people, and minified JSON is hostile to both. Version control makes it worse: a one-line file produces a diff showing the entire content changed for a single value edit, which destroys review and blame. Keep configuration pretty-printed and minify only what ships.

Key names are the real payload

Once whitespace is gone, verbose key names repeated across thousands of array elements dominate the size. Shortening them helps far more than minifying, at a real cost in readability, and is usually the wrong trade unless the volume genuinely justifies it. If you are at that point, a binary format such as MessagePack or Protocol Buffers is the honest answer.

Minified is still valid JSON

Any parser accepts it, and reformatting is lossless in both directions. Nothing is destroyed, unlike lossy image compression, so there is no reason to keep a separate minified copy as a build artefact rather than generating it on demand.

Frequently Asked Questions

Privacy & Security

All processing happens locally in your browser — nothing is uploaded.

Data: None
Client-side-Side
Active
v1.0

How to Use

Paste JSON to minify it. Errors are reported with the position; toggle Beautify to expand.

Disclaimer: This tool is provided "as is" without warranty of any kind. Results are for educational and utility purposes.