Utilities

HTML Minified HTML

Minify HTML with optional comment, whitespace, CSS, and JavaScript compression.

91 B -> 0 B, 100.0% smaller

About HTML Minifier

The HTML minifier runs html-minifier-terser in your browser, and you choose what it does: remove comments, collapse whitespace, remove optional tags, and minify inline CSS and JavaScript. If the library can't handle your HTML, the tool shows the error and falls back to a simpler pattern-based minifier.

Frequently asked questions

Does whitespace-stripping break inline-block layouts?

It can, because the space between inline elements is part of the layout. Turn off Collapse whitespace and compare when buttons or links suddenly touch.

Is HTML minification worth it with gzip?

Usually a little. Gzip already shrinks repeated whitespace well, so the gain after compression is smaller than the minified size suggests, but comments and stray whitespace still cost bytes.