HTML Minifier
Remove extra whitespace and comments from HTML markup.
Your input is processed locally in this browser tab.
How to use HTML Minifier
Paste readable HTML markup or open an .html file (HTML + Minify mode is preselected).
Whitespace between tags is collapsed cleanly while text spacing inside tags stays valid.
Copy or download the compacted HTML and inspect the before/after byte count.
Frequently asked questions
How much smaller will minified HTML be?
Byte savings appear live in the footer bar comparing input and output byte lengths.
Can I re-indent the HTML again later?
Yes. Switch Operation back to Beautify anytime.