Developer tools
HTML Minifier
Minify HTML online: remove comments and extra whitespace to make pages smaller and faster. Free, safe, in your browser.
How to use the HTML Minifier
-
1
Paste your HTML.
-
2
Click Minify.
-
3
Copy or download the result.
About this tool
Remove comments and collapse whitespace in HTML while leaving the contents of pre, textarea, script and style blocks alone. See how many bytes you save.
Frequently asked questions
Can minifying break my page?
This tool is conservative: it keeps preformatted content and inline scripts intact. Always test the page after minifying.
Should I minify by hand?
For a live site, your build tool or caching plugin can minify automatically on every change.