Shrink JavaScript, CSS, HTML and SQL with real compressors — Terser and CSSO, not whitespace stripping — and see exactly how many bytes you saved.
4 tools in this category.
Collapse SQL to one line and remove comments, with quote-aware parsing so string literals are never damaged.
Shrink HTML safely — protects whitespace-sensitive regions and preserves the spaces between inline elements.
Compress stylesheets with a CSS-aware optimiser that merges rules and shortens values, not just strips spaces.
Compress JavaScript with Terser — dead-code elimination, name mangling and expression folding.
Four minifiers that do real compression rather than whitespace stripping. The JavaScript Minifier runs Terser, so it renames local variables, drops unreachable branches and collapses expressions; the CSS Minifier runs CSSO, which merges duplicate rules and shortens values structurally. Stripping spaces from JavaScript typically saves 20–30%. Terser on the same file usually saves 60% or more, and the difference is entirely in the transformations a whitespace remover cannot safely attempt.
Read the saving in the right context. Every byte reported here is measured before compression, and your server almost certainly serves the file gzipped or brotli-compressed — and those algorithms are very good at repeated whitespace. So a minifier that only removes spaces saves far less over the wire than its own numbers suggest, because gzip was already handling that. What survives compression is the structural work: shorter identifiers and deleted code are genuinely fewer bytes on the network and, more importantly, less for the browser to parse.
Minify as a build step for anything you ship regularly. These tools are for the cases a build step does not cover — a one-off inline snippet, an email template, a CMS field with a size limit, or checking what a bundler ought to be producing when you suspect it is not.