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.