Appearance
Accent color
Font size
Layout density
Preferences are saved on this device for the minifier only.
Minify HTML and ship lighter pages
Strip whitespace, comments, and redundant markup from your HTML — instantly, in your browser. Faster loads, better Core Web Vitals, and a safe margin under Google’s 2MB crawl limit.
- 10–30%
- Typical savings
- 2 MB
- Google crawl cap
- 0
- Bytes uploaded
Under the hood
What minification strips away
Six categories of dead weight — each one invisible to users, all of them bytes on the wire.
Whitespace & indentation
Tabs, newlines, and runs of spaces between tags collapse to nothing — or a single space where semantics require it.
\n \t → nothing HTML comments
Comments meant for developers never reach users. Stripping them removes dead weight instantly.
<!-- dev note --> Optional closing tags
Many closing tags are optional in HTML5 — even body and html. Omitting them is valid and smaller.
</li> </p> </td> Boolean attribute values
The value is implied for disabled, selected, required, and readonly too.
checked="checked" → checked Default attributes
Spec-implied attributes on inputs, scripts, and forms can all be removed.
type="text" · method="get" Empty elements & quotes
Quotes around safe attribute values can drop, and redundant protocol URLs can go relative.
class="x" → class=x See it work
Same page, 43% fewer bytes
Identical rendering in every browser — the only difference is what travels over the network.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Page metadata -->
<title>My Page</title>
</head>
<body>
<h1 class="title">Hello</h1>
</body>
</html> <!DOCTYPE html><html lang="en"><head><title>My Page</title></head><body><h1 class="title">Hello</h1></body></html> Real-world numbers
Typical savings by page type
CMS-built and template-heavy pages carry the most dead weight — and save the most.
Representative ranges from real-world markup — your mileage varies with template quality.
How to use
Four steps to a lighter page
Paste your HTML
Drop a full document or a partial fragment into the input — templates, CMS output, or hand-written markup all work.
Pick your options
Toggle comment removal, whitespace collapsing, optional tag omission, and attribute simplification to taste.
Review the savings
See before/after byte counts and compression ratio instantly. The minified output updates as you type.
Copy or download
Grab the compressed HTML for deployment — and keep your readable source as the version you edit.
SEO impact
Why byte-shaving is an SEO move
Minified HTML won’t rank you #1 — but it removes real technical friction from crawling and rendering.
LCP ↓
Core Web Vitals
Smaller HTML reaches the browser sooner, so your largest contentful paint fires earlier — a direct input to Google’s page-experience signals.
2 MB
Google’s 2MB crawl cap
Googlebot now ignores HTML past a 2MB threshold. Minification keeps bloated templates safely under the limit so nothing gets truncated.
−20%
Bandwidth & crawl budget
Leaner pages mean faster crawls and cheaper delivery — Googlebot fetches more of your site per visit, and CDN bills shrink at scale.
Compare
Minify vs. gzip vs. Brotli — you need all three
They solve different problems and stack multiplicatively.
| Technique | How it works | Typical gain | Where it happens |
|---|---|---|---|
| Minification | Rewrites the source — strips characters | 10–30% smaller | Before sending, at build time |
| Gzip | Compresses bytes on the wire (DEFLATE) | 60–80% smaller | Server → browser, transparent |
| Brotli | Newer compression with a web dictionary | 70–85% smaller | Server → browser, HTTPS only |
FAQ
Minification questions, answered
What does an HTML minifier actually remove?
Everything the browser doesn’t need: indentation, line breaks, comments, optional closing tags, default attribute values, boolean attribute values, and redundant quotes. The rendered page is identical — only the bytes change. Think of it as lossless compression of your source code, not your content.
Can minification break my page?
Rarely, if done correctly. The edge cases: <pre> and <textarea> content is whitespace-sensitive and must be preserved; inline CSS and JavaScript need their own minifiers; and old conditional comments (<!--[if IE]>) can matter on legacy sites. A good minifier handles all three automatically — this one does.
If my server uses gzip or Brotli, is minifying still worth it?
Yes — they stack. Compression algorithms work better on already-clean input, and minification removes bytes that compression can only shrink, not delete. Minify HTML typically saves another 5–10% after gzip. Also, minified source helps non-HTTP contexts: email, embedded viewers, and saved pages.
How much smaller will my HTML get?
Typically 10–30%, depending on how the markup was written. CMS-generated and page-builder HTML with heavy indentation and comment soup sees the biggest wins; hand-tuned markup less so. The tool shows exact before/after byte counts so you never have to guess.
Does minified HTML help SEO?
Indirectly but measurably. Smaller HTML improves LCP and time-to-first-byte, keeps you safely under Googlebot’s 2MB crawl cap, and reduces crawl cost on large sites. It’s one of the cheapest page-speed wins available — no rendering behavior changes at all.
Should I edit the minified version afterwards?
No — always keep your readable source as the editable version and treat minified output as a build artifact. Minify at deploy time (or paste through this tool), ship the compressed copy, and iterate on the original. Editing minified HTML is a one-way door to merge conflicts and pain.
Is my code uploaded to a server?
Never. All minification runs locally in your browser — unreleased templates, proprietary markup, and internal tooling code stay on your device. Nothing is logged, stored, or transmitted, and the tool keeps working offline.
Keep going
Complete the optimization pass
Page Size Checker
Check if your HTML exceeds Google's 2MB crawl limit (new in 2026).
HTTP Header Checker
Inspect HTTP response headers and security configurations.
URL Encoder / Decoder
Encode or decode URLs, query parameters, and percent-encoded strings.
HTML Entity Encoder / Decoder
Encode or decode HTML entities and special characters.
212 B → 121 B · still valid HTML5
Every byte you don’t send is free speed
Paste your markup above — instant compression, live savings report, zero uploads.