HTML Minifier
Minify HTML online: strip comments and collapse whitespace. See before and after file sizes. Free and private.
Frequently asked questions
- How much does it compress?
- It reports the exact before and after byte counts. Real savings depend on how much whitespace and comments your HTML has.
- Is the output safe for production?
- It removes comments and collapses whitespace between tags. Contents of pre, textarea, script and style blocks are preserved so layout and code keep working.
- Does it upload my HTML?
- No. Minifying happens entirely in your browser.
- Does it minify inline JavaScript and CSS?
- No, inline scripts and styles are preserved byte-for-byte. Use a dedicated JS or CSS minifier for those.
This tool runs entirely in your browser. No data is uploaded anywhere.