HTML minifier

Remove HTML comments and reduce whitespace to create a more compact document.

How it works

Paste the HTML and click Minify. HTML comments and spaces between tags are removed to get a more compact version.

Frequently asked questions

Does it keep scripts and styles intact?

The tool performs light minification without changing the contents of script, style, pre, or textarea elements.

Does it replace a production minifier?

No. For complex projects, use the minifier integrated into your build process.