Formatted JSON is full of whitespace that exists purely for human readers — indentation, line breaks, spaces after colons. A parser ignores all of it. Stripping it before transmission or storage is free savings.
How to use the JSON Minifier
- Paste your formatted JSON
- Click Minify
- Check the before and after sizes
- Copy the minified output
How much you actually save
It depends on the shape of the data. Deeply nested structures with short values have proportionally more indentation, so they compress most — 30% or more is common. Documents dominated by long string values save less, often under 10%, because the strings themselves are untouched.
Worth knowing: if your server already applies gzip or brotli, the extra win from minification is much smaller, because those algorithms compress repeated whitespace very efficiently. Minify anyway for data you store at volume or embed in another document, but do not expect dramatic gains on an already-compressed HTTP response.
When to keep JSON formatted
Anything a person edits or reviews should stay formatted: configuration files, fixtures, seed data, anything in version control. A minified file produces a single-line diff for every change, which makes code review essentially impossible.
The rule of thumb is simple — minify what machines read, format what humans read.
Frequently asked questions
Does minifying lose any data?
No. Only insignificant whitespace is removed. Parse the minified output and you get an object identical to the original in every respect.
Can I reverse it?
Yes — formatting the minified JSON restores readable indentation. The two forms are fully interchangeable.
Is whitespace inside string values removed?
No, and it must not be. Whitespace inside a quoted string is part of the data. Only whitespace between tokens is stripped.
Should I minify if my server uses gzip?
The additional saving is small, because gzip already handles repeated whitespace well. It is still worth doing for data stored in bulk or embedded in other documents.