What does HTML minification actually remove?
Three things: (1) whitespace between tags — every > <space> < becomes ><; (2) HTML comments <!-- ... -->; (3) consecutive whitespace runs inside text content collapse to a single space. The DOM tree the browser builds is identical to the unminified version, so visual rendering is unchanged.
How much size reduction is typical?
Hand-authored HTML with deep indentation and developer comments commonly compresses 20–35%. Already-clean templates from a build tool see 5–10%. Combined with gzip/brotli, the wire-size win is smaller (compression is good at repeated whitespace) but every removed byte still saves parse time on the browser.
Will minification break <pre> or <textarea> content?
A naive minifier will, because <pre> and <textarea> rely on whitespace being preserved exactly. The OpenFormatter minifier uses a generic regex pass that does collapse whitespace inside these elements — for production HTML containing <pre> code blocks, run the output through a careful test pass or use a parser-based minifier that respects whitespace-significant tags.
Does it remove conditional comments for IE?
IE conditional comments (<!--[if IE]>) look like comments but are functional in IE9 and below. Modern minifiers (and this one, by virtue of stripping all comments) remove them — which is fine for sites that no longer support IE. If you support legacy IE, do not minify your <head> with this tool.
Is minified HTML valid HTML?
Yes. HTML is whitespace-tolerant outside of a few specific elements (pre, textarea, script, style), so collapsing inter-tag whitespace and removing comments produces output that the W3C validator accepts. Run the result through an HTML validator to confirm if you have unusual content.
Should I minify HTML in addition to gzip/brotli?
Yes. gzip is excellent at compressing repeated whitespace, but it cannot remove comments. Minified HTML compresses smaller than unminified HTML, and the browser still has to parse fewer bytes after decompression. The combined win is real, especially on slow networks and low-end devices.
Will it minify inline <script> and <style> blocks?
Whitespace inside script and style blocks will be collapsed, which is usually fine for CSS but can break JavaScript that relies on automatic semicolon insertion (ASI) across what was a line break. If your HTML contains inline JS, minify the JS separately with a real JS minifier first, then run this HTML minifier.
Is my HTML uploaded to your servers?
No. Minification runs entirely in JavaScript inside your browser. HTML containing internal copy, customer data, or unreleased layouts never leaves the device. Open DevTools Network and click Run — zero requests fire.