Jens Oliver Meiert

HTML Minifier Next: Improved Minification, More Comprehensive CLI, Clearer Docs

Published on Oct 29, 2025, filed under , . (Share this on Mastodon or Bluesky?)

When taking on stewardship of HTML Minifier, I focused on updating and removing dependencies as well as mitigating potential security vulnerabilities.

Since then, I updated HTML Minifier Next (HMN) with a few features that still keep it compatible with the original HTML Minifier (and HTML Minifier Terser). Here are three:

Improved Minification

Slightly improved, I should say, given that HMN already minified really effectively. The removeRedundantAttributes option was improved to remove a number of additional attribute value defaults that don’t need specifying.

While I erred on the side of caution marking this a potential breaking change—there could be some edge cases—, it should be a fairly safe update.

More Comprehensive CLI

In the most recent updates, the CLI was greatly improved. It now comes with a progress indicator particularly helpful for large operations, a verbose mode detailing processing (--verbose/-v), and a dry mode (--dry/-d).

Screenshot of HTML Minifier Next finishing the processing of 16,000 files.
Concluding a verbose run.

These and existing options were more clearly covered in the documentation:

Clearer Docs

The documentation, notably the README, was extended and edited and fine-tuned to make it easier to understand how HMN can be used and what options are available.

This should significantly improve usability, but more updates are likely.


The changelog documents all other changes since version 2.0.0.

If you haven’t used HMN yet, try it out on the playground or right in your projects! If you’re using HTML Minifier (unmaintained) or HTML Minifier Terser (effectively unmaintained), you should be able to upgrade without problems by changing the package to html-minifier-next instead.

If you need a config for strong results, take a look at my “HTML optimizer” settings. (In the future, there may be presets that make configuration a lot easier.)

Finally, as with any open-source project, if you spot a bug or have a suggestion, please file an issue. Thanks!

About Me

Jens Oliver Meiert, on November 9, 2024.

I’m Jens (long: Jens Oliver Meiert), and I’m a web developer, manager, and author. I’ve been working as a technical lead and engineering manager for companies you’ve never heard of and companies you use every day, 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 other areas like philosophy. Here on meiert.com I share some of my experiences and views. (I value you being critical, interpreting charitably, and giving feedback.)