HTML Minifier
Minify HTML free in your browser — strip comments and whitespace to shrink your pages. Nothing is uploaded.
Report a problemHow to use
- Paste your HTML into the input box, or edit the example that is already there.
- It minifies as you type — press Minify to confirm and see the new size.
- Copy the minified HTML and drop it into your project.
FAQ
Is anything uploaded?
No — it runs entirely in your browser. Your HTML never leaves your device and is not sent to any server, so it works offline and stays private.
What does minifying HTML do?
It removes comments and extra whitespace (line breaks, indentation, spaces between tags) so the file is smaller and loads a little faster. The content of pre, textarea, script and style blocks is left untouched so your page still works.
Is the result perfectly safe to ship?
This is a fast, best-effort minifier built for everyday HTML. It protects whitespace-sensitive blocks, but very unusual markup (for example comments hidden inside attribute values) can need a hand. Always give the output a quick check before publishing.