Updated: 2026-09-13
This benchmark measures how well different tools minify real-world HTML pages. For every URL, the page is fetched and the same source HTML is passed to each minifier. Each minifier is run with aggressive settings, including CSS/JS/SVG optimization when supported. Results are reported as minification rate (percentage size reduction vs the original HTML). Higher is better.
| Website | Source (KB) | html-minifier-terser | html-minifier-next | htmlnano | minify | minify-html | swc-html |
|---|---|---|---|---|---|---|---|
| alistapart.com | 64 | 6.8% | 11.0% | 35.9% | 10.3% | 8.0% | 11.0% |
| developer.mozilla.org | 117 | 39.1% | 42.9% | 50.0% | 41.3% | 41.2% | 41.7% |
| css-tricks.com | 174 | N/A | 15.6% | 27.8% | 13.7% | 8.5% | 14.5% |
| en.wikipedia.org | 248 | 4.7% | 7.6% | 9.8% | 6.0% | 6.0% | 6.3% |
| leanpub.com | 483 | 1.2% | 10.3% | 10.2% | 5.2% | 1.7% | 5.8% |
| github.com | 564 | 1.4% | 15.5% | 15.5% | 5.2% | 4.0% | 4.5% |
| edri.org | 84 | 7.4% | 12.9% | 32.9% | 12.2% | 7.9% | 12.6% |
| html.spec.whatwg.org | 151 | -3.9% | 0.6% | 0.3% | 0.3% | 0.2% | 1.5% |
| stackoverflow.blog | 130 | 4.0% | 7.0% | 7.7% | 4.6% | 4.9% | 5.5% |
| mastodon.social | 49 | 3.7% | 13.7% | 13.7% | 5.8% | 6.8% | 8.4% |
| w3.org | 50 | 18.9% | 24.6% | 24.2% | 24.3% | 20.3% | 24.0% |
| eff.org | 55 | 8.6% | 15.1% | 15.5% | 13.0% | 11.0% | 13.0% |
| apple.com | 305 | 5.0% | 8.0% | 7.7% | 6.3% | 5.6% | 5.8% |
| home.cern | 291 | N/A | 13.0% | 25.5% | 8.0% | 4.7% | 10.2% |
| weather.com | 340 | 0.5% | 8.6% | 9.4% | 6.6% | 0.6% | 6.9% |
| lafrenchtech.gouv.fr | 169 | 20.0% | 24.7% | 65.3% | 23.8% | 20.6% | 24.4% |
| bbc.co.uk | 770 | 0.8% | 7.2% | 6.8% | 4.7% | 1.2% | 6.4% |
| un.org | 154 | 14.1% | 22.3% | 44.6% | 19.8% | 15.2% | 17.5% |
| faz.net | 1618 | 3.4% | 10.7% | 15.8% | 4.6% | 3.7% | 8.6% |
| tc39.es | 7447 | 5.7% | 8.2% | 8.3% | 6.6% | 6.2% | 7.9% |
| Avg. minify rate | 7.9% | 13.9% | 20.7% | 11.1% | 9.2% | 11.8% |
New HTML minifiers are welcome! Please submit a PR to add a new minifier to the benchmark, or open an issue to request it.
Run the benchmark locally:
npm install --omit=dev
npm startAfter that README.md will be updated with the new benchmark data.
README.md is generated dynamically from README.template.md. So don't alter it.
- https://github.com/j9t/minifier-benchmarks — by html-minifier-next maintainer