HTML Minifier
Strip comments and whitespace to shrink your HTML.
About the HTML Minifier
The HTML Minifier strips comments and unnecessary whitespace from your markup to shrink the file size, and reports how much smaller the result is. Lighter HTML loads marginally faster and uses less bandwidth, which adds up on high-traffic pages.
Frequently asked questions
It removes comments and collapses whitespace, which is safe for ordinary markup. Be careful only with content inside pre or textarea tags, where whitespace is meaningful — review those after minifying.
It varies with how much whitespace and how many comments the original has, often in the range of 10 to 30 percent. The tool shows the exact before-and-after sizes for your file.