HTML minifier
Shrink HTML by collapsing whitespace and dropping comments — safely, without touching scripts, styles, or attribute values.
How to use
- Paste the HTML.
- Minify and see the byte savings.
- Copy or download the result.
What it supports
Preserves script/style/pre/textarea contents and keeps a space between inline elements so text spacing stays right. Legacy conditional comments are kept. It does not rewrite attributes or shorten class names. Up to 300,000 characters.