HTML Minifier

Apply conservative whitespace and comment cleanup to HTML while protecting script, style, pre and textarea blocks.

DeveloperHTMLBrowser processing

Status: Paste HTML and minify it.

What this minifier changes

It removes ordinary HTML comments and whitespace between tags while temporarily protecting script, style, pre and textarea blocks.

Safer scope: This tool intentionally avoids aggressive JavaScript, CSS or text-node rewriting.
Important limitation

Always test minified markup before production use. Template languages, unusual conditional comments and application-specific whitespace rules can require a dedicated build tool.

Privacy

The HTML is processed locally by the page script and is not uploaded by this tool.

Related tools