Introduction
htmlnano is a modular HTML minifier built on top of PostHTML. Inspired by cssnano.
Benchmarks
| Website | Source (KB) | html-minifier-terser | html-minifier-next | htmlnano | minify | minify-html |
|---|---|---|---|---|---|---|
| stackoverflow.blog | 142 | 3.7% | 32.3% | 6.8% | 4.5% | 4.6% |
| github.com | 549 | 2.9% | 42.2% | 16.6% | 7.3% | 5.7% |
| en.wikipedia.org | 218 | 4.6% | 7.7% | 7.4% | 6.2% | 2.9% |
| developer.mozilla.org | 109 | 37.9% | 42.0% | 52.7% | 40.1% | 39.9% |
| tc39.es | 7243 | 8.5% | 11.8% | 9.3% | 9.5% | 9.1% |
| apple.com | 210 | 9.2% | 14.4% | 11.2% | 10.3% | 9.8% |
| w3.org | 50 | 19.0% | 24.6% | 23.4% | 24.4% | 20.3% |
| weather.com | 1960 | 0.4% | 11.2% | 19.8% | 11.6% | 0.6% |
| Avg. minify rate | 10.8% | 23.3% | 18.4% | 14.2% | 11.6% |
Latest benchmarks: https://github.com/maltsev/html-minifiers-benchmark (updated daily).