HTML Minifier
Shrink your HTML by removing comments and collapsing extra whitespace between tags — the tool shows exactly how many characters and percent you save, and everything runs in your browser.
How to use
- Paste your HTML into the first box.
- Choose whether to remove comments, then click Minify HTML.
- Copy the minified result and check the saving.
Tips
- Keep a backup of the original HTML — minified code is hard to edit.
- Content inside pre, textarea, script and style blocks can be whitespace-sensitive.
- Uncheck comment removal if those comments are needed.
- Compare before/after sizes to decide whether minifying is worth it.
Note: Content inside pre, textarea, script and style blocks can be whitespace-sensitive — review minified output before using it on a live page.
Frequently Asked Questions (FAQ)
What does the HTML Minifier remove?
It removes HTML comments and collapses unnecessary whitespace between tags.
Can I see how much size I saved?
Yes, the tool shows a live size-saving report as you minify.
Will it break my HTML?
It only removes comments and extra whitespace, so the page structure stays intact.
Is my HTML sent to a server?
No. Minification runs entirely in your browser, so your code never leaves your device.