HTML Minifier Online
Minify CSS, JavaScript, HTML or JSON in the browser: strip comments and whitespace, see the size saved instantly.
Result
This page opens the code minifier with HTML preselected. It removes HTML comments and collapses the formatting whitespace between tags — the indentation and newlines that make source readable but that browsers mostly ignore — while single spaces inside running text are kept so your visible content renders unchanged.
Elements where whitespace is meaningful are protected: everything inside pre, textarea, script and style tags is copied byte-for-byte. Multi-line tags with wrapped attribute lists are folded into one line. Typical templates and exported pages shrink by 10–25%, which matters for email HTML, where some clients truncate large messages, and for pages served without gzip.
Paste your markup, press the button, and check the size panel for exact before/after bytes and the percent saved. The result can be copied to the clipboard or downloaded as an .html file — everything happens locally in your browser, so unpublished pages stay private.