HTML Minifier_

Whitespace and comments removed, and nothing else. Attributes keep their quotes, closing tags stay closed, and no attribute is dropped for being empty — every one of those is a saving that some minifiers take and each one has a way of going wrong.

HTML is the one markup on this site where minifying can change what a reader sees rather than only what a parser reads. The space between two inline elements is rendered; remove it and two words run together on the page. Everything here is built around not doing that.

toolkit.codes/html-minifier
Before
After
Untouched regions
Smaller by
UTF-8
Ready
100% LOCAL
Input
Any HTML — a full page, a fragment, or template output. Conditional comments are recognised and kept, because they are instructions rather than notes.
Output
The same markup with collapsible whitespace collapsed and ordinary comments removed. What renders is identical to what rendered before.
Processing
Compacted in this tab by a single pass that parks the regions it must not touch, collapses what is left, and puts them back byte for byte.
Limits
Whitespace and comments only. No attribute-quote removal, no dropping optional closing tags, no minifying of inline CSS or JavaScript — those are real savings and each is a real risk.
Whether it is safe depends on your CSS
A minifier reads your markup and cannot read your stylesheet. Any element styled white-space: pre, pre-wrap or break-spaces renders its whitespace exactly as written — and that styling can arrive from a class, a framework, or a rule three files away. So
 and