HTML Minifier
Minify HTML by removing comments and collapsing the whitespace between tags, shrinking the page weight your visitors download.
- 100% Free
- No Registration
- Works in Your Browser
HTML Minifier
This tool's workspace loads here.
How to Use
- Paste your HTML into the input box.
- Choose whether to remove HTML comments.
- Click Minify HTML.
- Copy the minified result and see the size saving.
About This Tool
Minify HTML by removing comments and collapsing the whitespace between tags, shrinking the page weight your visitors download. Pre, textarea, script and style contents are protected byte-for-byte, and the tool shows exactly how many characters were saved.
Frequently Asked Questions
Will minifying break my layout?
Whitespace between block-level tags is not rendered, so layout is safe. Inline elements keep the single space that separates them.
Is my code uploaded?
No. Minifying happens in your browser.
How much smaller will it be?
Typically 10–30% for hand-written HTML. The exact saving is shown after every run.