1. Paste HTML
Add the HTML snippet or template you want to compress.
Minify HTML online in your browser. Paste HTML markup, remove comments and extra whitespace, then copy compact HTML for snippets, templates, docs, or quick page checks.
Add the HTML snippet or template you want to compress.
The online HTML minifier updates the compact output instantly.
Copy the compressed markup for your page, email, or docs.
Original
100 B
Minified
93 B
Saved
7 B (7%)
Removes comments, extra whitespace, and gaps between HTML tags while keeping the markup readable enough to inspect.
HTML minification is useful for compact snippets, email templates, docs examples, small static pages, and copied markup where comments and extra spacing are not needed.
It removes comments, extra whitespace, and gaps between tags to produce more compact markup.
For ordinary markup it is usually safe, but whitespace-sensitive inline content should always be reviewed before use.
Yes. The tool can copy the output or download a minified HTML file.