The space that has to stay
The gap between <span>one</span> and <span>two</span> is a word break. Delete it and the page reads onetwo. So runs of whitespace between inline elements collapse to a single space rather than disappearing, while whitespace between block elements goes entirely — the browser was never drawing it.
<pre> and <textarea> are left exactly as they are. Conditional comments are markup, not notes, and are kept.
Attributes
Whitespace between attributes collapses, but whatever is inside their values does not: title="a b" keeps its spacing, because that is what the reader sees. A > inside a quoted value does not end the tag, which is the mistake that turns one careless page into an unparseable one.
Frequently asked questions
Is my markup uploaded anywhere?
No. The document is processed inside the tab. The markup is processed in the page and never transmitted.
Will the page still render identically?
Yes. Whitespace that the browser collapses anyway is removed; the single spaces that act as word breaks are kept, and pre and textarea content is untouched.
Does it minify inline CSS and JavaScript?
Yes — anything inside a style or script tag goes through the matching minifier.
Something wrong with this tool, or an idea for it? Tell us