Minify HTML
Minify mode collapses the whitespace between tags, removes comments, and keeps closing slashes and tag casing intact so the output stays valid for XHTML-style templates and custom elements. On a typical page, whitespace and comments account for 5 to 20 percent of the file, more when the source is deeply indented.
Two options change the outcome:
- Minify inline CSS & JS compresses
<style>and<script>contents,style="..."attributes, and inline event handlers. Turn it off if inline scripts use syntax the compressor rejects. - Conservative whitespace collapses each whitespace run to a single space instead of removing it. Use it when the page mixes text and inline elements, because
<b>bold</b> <i>italic</i>renders differently with the space removed.
Beautify HTML
Beautify mode re-indents markup with 2 spaces, 4 spaces, or tabs, and wraps long lines at 80, 100, or 120 characters. It parses the document first, so mismatched or unclosed tags surface as an error with a line number instead of producing scrambled output.
Formatting respects whitespace-sensitive elements. Content inside <pre> and <textarea> is left untouched, since re-indenting it would change what the browser displays.
Whitespace between inline elements
The most common surprise after minification is a missing space between links or buttons that sat on separate lines. Browsers render the line break between two inline elements as a space; full whitespace collapsing deletes it. If navigation items or inline labels look glued together after minifying, re-run with Conservative whitespace enabled.
Fragments and templates
Full documents are not required. A single component, an email table, or a CMS body fragment formats the same way. Template syntax from Jinja, Liquid, or Blade usually survives both modes because it lives inside text nodes and attribute values, but check the output when template tags wrap partial elements, since the parser cannot know an {% if %} block opens a tag it never sees closed.
Reading the stats
The stats row tracks input and output byte counts, line counts, and the size change as a percentage. Byte counts use UTF-8 encoding, which matches what a server actually sends. Gzip and Brotli narrow the gap between minified and unminified HTML, but minification still wins on parse time and on pages served without compression.