0 bytes

About the HTML Minifier

HTML files often contain significant whitespace from indentation, line breaks, and developer comments. Minifying removes all of this to produce a smaller file that loads faster — especially important for slow connections.

Options

Frequently Asked Questions

Is it safe to minify HTML?
Yes for most HTML. Be cautious with pre, code, and textarea elements where whitespace is meaningful. This tool does not currently detect and protect those elements.
What does strip comments do?
Removes HTML comments except conditional comments which are preserved as they affect browser behaviour.
How much smaller will my HTML be?
Typically 10–30%. The biggest gains come from collapsing whitespace between tags.
Text & Dev tools
Ad