HTML Minifier
Remove comments and extra whitespace from HTML.
Keep or share the finished result
Copy or share after running the tool. Saved tools and settings stay in this browser.
What would you like to do next?
Minify HTML
HTML copied from templates, editors or demos can contain comments and extra whitespace that make files larger than necessary. Paste HTML and this tool creates a compact version by removing comments and tightening spacing around tags.
Lightweight cleanup for snippets
This is a simple browser minifier for everyday snippets. Complex templates with whitespace-sensitive content should be tested after minifying.
Frequently asked questions
Does it remove all whitespace?
No. It removes comments and obvious extra spacing, but avoids advanced parsing.
Can it break complex HTML?
Whitespace-sensitive templates should be tested after minifying.
Is code uploaded?
No. The minifier runs in your browser.