How to minify HTML online
Paste HTML markup — get minified output with comments and whitespace removed.
Minified HTML ships faster and uses less bandwidth. The HTML Minifier strips comments and collapses whitespace while preserving tag structure — all in your browser.
How it works
- Paste HTML — full page or fragment.
- Minified output — updates as you type.
- Copy — compressed markup ready to deploy.
What gets removed
HTML comments, inter-tag whitespace, and line breaks collapse. Content inside pre and textarea may need manual review.
Beautify instead
For readable markup, use the HTML Beautifier.