Compress your HTML source code instantly to optimize webpage load speeds.
A quick guide to what minification actually strips out, how it affects Core Web Vitals, and answers to the questions we get asked most.
A minifier strips out every byte that exists purely for human readability β indentation, line breaks, and comments β without touching a single tag, attribute, or piece of visible content.
When developers write markup, they use indentation, blank lines, and
inline comments to keep the source readable and easy to debug.
Browsers don't need any of that β a parser reads
<div class="card"> exactly the same whether it's
sitting on its own indented line or packed against ten other tags.
A proper minifier parses the document into its real tag structure
first, then rebuilds it with every unnecessary byte removed β not
with a blind find-and-replace across the raw text, which is what
causes cheaper tools to accidentally corrupt JavaScript or CSS
sitting inside <script> and <style>
blocks.
Here's the same markup run through the tool above, with comments removed and attributes normalized:
Google treats page responsiveness β particularly Time to First Byte and Largest Contentful Paint β as ranking-relevant signals, and a smaller HTML payload downloads and parses faster on every visit.
Reducing document size doesn't rewrite your Lighthouse score by itself, but it removes one variable that consistently drags on it. Every kilobyte trimmed from the initial HTML response is a kilobyte the browser doesn't have to wait for before it can start building the DOM and painting content β which matters most on mobile connections and for visitors further from your server.
A smaller HTML response means less to download and parse before the browser can start rendering β directly supporting LCP.
Built on a real tag parser, not a blind regex β so content inside <script> and <style> blocks is never mangled.
Beyond whitespace, it collapses boolean attributes and strips empty or default ones most minifiers leave behind.
<!--[if IE]-->,
which this tool detects and preserves automatically even when
comment stripping is on, since removing them can silently
break legacy fallback content. If your site relies on any
other special server-side hooks embedded in comments, disable
the option to keep everything intact.
checked, disabled,
and required only need to be present to take
effect β the HTML spec doesn't require a value at all. Writing
checked="checked" is valid but adds unnecessary
bytes; the tool collapses it to just checked
wherever it's safe to do so, and can also drop empty attributes
like class="" and redundant defaults like
type="text/javascript" for extra savings that most
minifiers skip entirely.