Comparing HTML Minifiers
Published on Dec 8, 2025, filed under development, html, optimization. (Share this post, e.g. on Mastodon or on Bluesky.)
Many years ago, in the original HTML Minifier, Juriy “kangax” Zaytsev included a comparison of HTML minifiers, as well as a script to re-run the respective benchmarks.
Its enhanced successor, HTML Minifier Next (HMN), embraces this spirit of transparency, including improved and extended benchmarks that now list additional minifiers, test across more sites, and include timing information:
While these metrics enable comparison, they can still only be rough—they depend on each minifier version tested (currently the latest each), the site tested, the machine tested on, and maybe even all the observers involved.
More importantly, the metrics aren’t going to make the decision for anyone—they ask to make a decision: At least how things stand right now, for HTML minification, you need to make trade-offs between effectiveness, speed, and security (minifier maintenance).
When cared for, data like this enables making more informed decisions about tooling, in this case, what HTML minifier to use. It should also enable healthy competition and perhaps some consolidation for what is some of our most critical web tooling, following the W3C HTML validator.
If you spot an issue with how the data is being generated, please let me know. Also, if you have suggestions to improve HMN effectiveness or efficiency, please reach out to me as well.
And, finally—HMN is now one of those tools that people (here: I) run in their spare time. If you like to value that time, consider purchasing and learning with one of my books, or inviting me to a good coffee. Much appreciated!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m a senior engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager for companies you use every day and companies you’ve never heard of, I’m an occasional contributor to web standards (like HTML, CSS, WCAG), and I write and review books for O’Reilly and Frontend Dogma.
I love trying things, not only in web development and engineering management, but also in philosophy. Here on meiert.com I share some of my experiences and perspectives. (I value you being critical, interpreting charitably, and giving feedback.)
