HTML minifier
Processed in your browser · nothing is uploaded
Collapses whitespace between tags and removes comments, while leaving pre, textarea, script and style alone and keeping conditional comments.
How to use the html minifier
Whitespace in HTML is not always insignificant, which is why aggressive minifiers cause visual bugs. Between two inline elements a single space is rendered, so removing it runs the words together — `<span>a</span> <span>b</span>` is not the same as `<span>a</span><span>b</span>`. This collapses runs of whitespace and removes it between block-level tags, which is the safe subset. Conditional comments are kept because removing them changes behaviour in old Internet Explorer, and while that scarcely matters now, silently changing semantics is not a minifier’s job.
Questions
Between block elements, yes. Between inline elements a single space is rendered, so this collapses rather than removes it.