Shrink your HTML files without breaking them. Paste your markup to strip comments and redundant whitespace, and see exactly how many bytes you saved.
How to Use
- Paste your HTML into the input box.
- Click Minify HTML.
- Copy the minified output and check your byte savings.
Key Features
- Strips comments — removes HTML comments safely.
- Collapses whitespace — redundant spaces and line breaks go.
- Byte savings — see before and after sizes plus the percentage saved.
- 100% private — runs entirely in your browser; nothing is sent or stored.
FAQs
Will it break my HTML?
It only removes comments and collapses whitespace; tags and attributes are untouched. Always test the result in a browser before deploying.
Does it affect preformatted text?
Whitespace is collapsed everywhere, including inside pre tags, so check preformatted blocks afterwards if spacing matters there.
Can it handle large files?
Yes. Everything is processed locally in your browser, so even large pages minify in a fraction of a second.
Related Tools
Try these related tools: CSS Minifier, JS Minifier and HTML Encoder/Decoder.