What minification actually removes
JSON permits whitespace between tokens purely for human readability — indentation, line breaks, spaces after colons and commas. Minification parses the document and re-serializes it with none of that, producing the smallest byte-identical-in-meaning representation. String contents are untouched: spaces inside values are data, not formatting. A typical pretty-printed API fixture shrinks by 25–40%, more when nesting is deep.
When minifying matters — and when gzip already did it
Over the wire, most servers gzip or brotli-compress responses, and compression algorithms flatten repeated whitespace almost for free — so minifying rarely changes transfer size much on a compressed connection. Minification earns its keep elsewhere: payloads embedded in a curl command or environment variable, JSON stuffed into a query string or HTTP header, storage systems that bill raw bytes, and log lines where one record per line is a hard requirement. It is about the contexts where the whitespace itself is in the way.