Strips HTML comments and collapses whitespace between tags - leaves the content of <script>, <style>, <pre>, and <textarea> untouched.
—original size
—minified size
—reduction
How it works
The minifier first pulls out anything inside <script>, <style>, <pre>, or <textarea> tags and swaps it for a placeholder token, so that content is never touched. It then strips every HTML comment, collapses whitespace sitting between tags down to nothing, squashes runs of spaces and tabs into one, trims each line, and deletes newlines outright — before splicing the protected blocks back in exactly as they were.
FAQ
Why doesn't it minify content inside <script>, <style>, <pre>, or <textarea> tags?
Because whitespace is meaningful inside those elements — collapsing it could break JavaScript, CSS, preformatted text, or a textarea's default value — so the minifier protects those blocks before touching anything else, then restores them untouched at the end.
Will this strip IE conditional comments like <!--[if IE]-->?
Yes — the minifier removes every HTML comment indiscriminately, so any conditional comments used for legacy browser targeting get stripped right along with ordinary documentation comments.
Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.