How much does removing whitespace save?
Indented JSON is typically 30–50% whitespace, and the ratio climbs the deeper the nesting and the shorter the keys. The size before and after, with the percentage saved, appears under the output box.
On the wire the gain is smaller than it looks, though. HTTP almost always ships responses through gzip or brotli, and repeated whitespace is exactly the pattern those compress best. If gzip is on, minifying JSON buys you little.
Where it still matters
- Environment variables and config values — when multi-line JSON has to go on one line
- Database columns — when it piles up in storage that applies no compression
- URL query strings — where length is capped (and encoding makes it longer still)
- One log line per event — a line break makes the log collector count several events
Minifying is validating
This tool does not sweep the text with a regular expression. It parses the JSON and serialises it again, so a result at all means the input was valid. Whitespace inside strings is data and is preserved, as you would expect.
ASCII only
This rewrites non-ASCII characters as \uXXXX escapes. Use it when a value has to
pass through an old system that only carries Latin characters safely. It grows the payload — a
three-byte character becomes six — so on anything modern there is no reason to turn it on.
Does the key order change?
No. If you want them sorted, use the sort-keys option in JSON Formatter.
My large numbers come back different
JavaScript numbers are double-precision floats, so integers are only exact up to about 9,007 trillion. Anything larger — a snowflake ID, say — can shift while being parsed. That is not a limit of this tool but of handling JSON in JavaScript at all, which is why large IDs are conventionally passed as strings.