Minify HTML by removing comments and collapsing whitespace, with pre and textarea blocks preserved.
Paste HTML, get a smaller version.
Paste your HTML into the input box.
Pick your options — comments and whitespace handling.
The minified HTML updates live with the size saved.
Copy the minified output into your site.
Built for speed, privacy and reliability — on any device.
Remove comments and collapse whitespace — see the exact percentage saved.
<pre>, <textarea>, <script> and <style> content is preserved untouched.
Keep or strip HTML comments with one checkbox.
Minifying runs locally — your HTML never leaves the browser.
No account, no limits.
Yes — whitespace inside pre and textarea blocks is preserved exactly, so formatting never breaks.
Whitespace between tags collapses; spaces between words within text stay. Check the live output before using.
No — legacy conditional comments like <!--[if IE]> are preserved for compatibility.
No. Minifying runs entirely in your browser.
The tool works in all modern browsers including Google Chrome, Mozilla Firefox, Microsoft Edge, Safari and Opera. We recommend keeping your browser up to date for the best experience.
Step-by-step guide with screenshots and tips.
Read guide →Step-by-step guide with screenshots and tips.
Read guide →Step-by-step guide with screenshots and tips.
Read guide →Step-by-step guide with screenshots and tips.
Read guide →