Crammed-on-one-line code, tidied up in one click. 100% client-side — your code never leaves the browser.
Both operations parse the same markup and re-serialise it differently, and they serve opposite purposes:
| Beautify | Minify | |
|---|---|---|
| Goal | Readability | Smaller payload |
| Whitespace | Indented, one tag per line where safe | Removed wherever it is insignificant |
| Typical gain | — | 10 – 25% before gzip, far less after it |
| Use it when | Reviewing or hand-editing markup | Shipping to production |
Note the last row: with gzip or Brotli enabled, whitespace already compresses to nearly nothing. Minifying HTML is rarely the bandwidth win people expect, whereas minifying JavaScript and CSS still helps because of parsing cost as much as size.
<pre> and <textarea>. Whitespace inside them is content. A formatter that reindents either will visibly change the output.{{ ... }} in a template are not HTML, and a strict parser may mangle them.CSS has fewer traps because whitespace between declarations is never significant, but two rules still bite: a space in calc() around + and - is required, and a minifier must not strip the space in a descendant selector (a b means something different from ab). Well-behaved minifiers handle both; naive ones have broken sites for exactly these reasons.
The strongest argument for consistent formatting is version control. When everyone's editor produces the same layout, a diff shows only real changes. Mixed formatting turns a one-line edit into a forty-line review, which is where mistakes slip through.