HTML Minifier

Compress HTML by removing comments and collapsing whitespace between tags, with a live byte-savings counter showing exactly how much space you reclaim. Inline scripts and styles are left untouched — use the JS and CSS minifiers for those. A quick step before committing a handwritten HTML template to production.

All processing happens in your browser. No data is sent to any server.

Frequently Asked Questions

What does HTML minification remove?
HTML comments and excess whitespace between tags are removed. The text content inside your elements is preserved exactly.
Will it break inline JavaScript or CSS?
Inline scripts and styles are not parsed by the minifier — only the surrounding HTML structure is processed. Use the dedicated JS and CSS minifiers for inline code.
How much can it reduce file size?
Savings are typically 10–30% for hand-written HTML, and more for auto-generated HTML with heavy indentation.

Related Tools