Dev
HTML Minifier
Comments and extra whitespace are removed.
Editor
Frequently Asked Questions
What does HTML minification remove?
Comments (<!-- -->), whitespace between tags, optional closing tags (</li>, </td> in some contexts), optional quotes around attribute values, and sometimes default attribute values. Aggressive minifiers also inline CSS/JS. This tool performs safe whitespace and comment removal.
Can HTML minification break layouts?
Possibly. Collapsing whitespace between inline elements can affect rendering — removing the space between two <span> elements removes the visual gap between them. Safe minification modes preserve inter-element whitespace. Test the minified output before deploying.
Is HTML minification worth doing?
For most modern sites, server-side gzip/brotli compression provides 70–90% size reduction, making HTML minification secondary. It has more impact on large HTML documents (generated pages) and when every byte of bandwidth matters.