Minify HTML to reduce file size, or test if your server sends gzip/brotli compression. See bytes saved, estimated compressed sizes, and optimization recommendations.
Both techniques reduce the amount of data transferred when a browser loads your page, but they work at different levels and can be combined for maximum impact.
Client tool
HTML MinificationRemoves whitespace, comments, optional closing tags, and redundant attributes from HTML source. Typical reduction: 5-20%.
Server config
gzip CompressionThe web server compresses HTML before sending. The browser decompresses automatically. Typical reduction: 70-80%. Configured in Apache, Nginx, or CDN.
Server config
Brotli Compression15-25% better than gzip for HTML. Requires HTTPS. Supported by all modern browsers. Typical reduction: 75-85%. Available in Nginx 1.11.6+.
Does HTML minification break my website?
Removing whitespace between block elements is always safe. Whitespace inside inline elements can sometimes affect visual spacing. Removing comments is safe unless you use conditional IE comments. Minifying inline JavaScript is the riskiest step — always test after enabling this option.
How do I check if gzip is enabled on my server?
In Chrome DevTools: open Network tab, click any HTML request, check Response Headers for content-encoding: gzip or content-encoding: br. In curl: run curl -H "Accept-Encoding: gzip" -I https://yoursite.com. The HTTP Compression Test tab (coming soon) automates this.
Should I use gzip or brotli?
Use brotli if your server supports it — better compression with no downside for modern browsers. Keep gzip as a fallback. Most CDNs (Cloudflare, Fastly, AWS CloudFront) support both automatically. For Nginx, install the ngx_brotli module and configure both.