HTML Minifier Next: Zero-Config Mode, SVG Minification With SVGO, Even Faster
Published on Mar 26, 2026, filed under tools, development, html, performance, optimization. (Share this post, e.g. on Mastodon or on Bluesky.)
A quick update on HTML Minifier Next (HMN)! After releasing HMN 5, I focused on three things:
Zero-Config Mode
The HTML Minifier franchise comes with a great set of HTML minification options, at the price of a frictionless developer experience.
In HMN, this already got better with the introduction of presets, but use becomes even more convenient with its new “zero-config mode.” While opinionated—otherwise requiring configuration—, it allows to run HMN instantly in any folder:
npx html-minifier-next --zeroThis uses comprehensive settings to minify all HTML code (as well as inline CSS, JS, and SVG code) in-place. Try it out under version control if you want to test the waters.
SVG Minification
Some HMN 4 versions featured basic SVG minification, but with HMN 5.1.0, SVGO was added in order to provide full SVG minification out of the box.
You can enable SVG minification via minifySVG (--minify-svg flag), which you can configure further if SVGO’s defaults aren’t satisfying all your project needs.
Performance Optimizations
Performance has been a priority ever since taking over the project, and that shows: If my memory is correct—I stopped testing against other HTML Minifier projects because of bugs and limitations that were fixed in HMN—, HMN is at least 3 times faster (!) than the original HTML Minifier. (If you want to probe this and you find out I err, let me know! I share this not to mislead, but to illustrate improvements.)
When you look at the HTML+ minifier benchmarks that I’ve started to maintain independently, you can tell that no JavaScript-based minifier can compete against a Rust-based minifier like minify-html. Still, HMN compares quite competitively, especially when you consider its effectiveness.
Although performance optimizations slowly hit a ceiling, speed will always be a priority for HMN.
_ What’s next? There’s no major update at the horizon right now, but I have some ideas both for HMN effectiveness and DX. Stay tuned, either here or right at the source!
About Me
I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager for companies you use every day (like Google) 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 with respect to politics and philosophy. Here on meiert.com I talk about some of my experiences and perspectives. (Please share feedback: Interpret charitably, but do be critical.)
