Gzip & Brotli compression checker
Paste a URL. We request it the way a browser does and tell you which encoding came back, how many bytes it saved and what to fix.
Checks the page and up to 40 of its same-origin CSS, JS, font and SVG files. No sign-up.
What the test checks
Compression is the cheapest speed win on the web. One server setting can shrink HTML, CSS and JavaScript by 70–80%, and it is surprisingly easy to lose without noticing.
When a browser requests a page, it sends an Accept-Encoding header listing the formats it can unpack, usually gzip, deflate, br, zstd. The server picks one, compresses the response and names its choice in the Content-Encoding header. If that header is missing, the file travelled uncompressed.
The checker sends the same request a current Chrome would. It then records the encoding the server chose and the size before and after compression. It repeats this for the stylesheets and scripts the page loads, because those are often served by a different server or CDN than the HTML.
How to read the results
Encoding served
The value of Content-Encoding on the HTML. Brotli (br) is the best result for text. Gzip is fine and supported everywhere. None means the server sent raw bytes, and that is worth fixing today.
Original and transferred size
Original size is the file as it sits on the server. Transferred size is what went over the network. For HTML, CSS and JS, transferred size should be 20–35% of the original with gzip and a little less with Brotli.
Saved
The share of bytes compression removed. Below 50% on a text file usually means it is not compressed at all, or it is already minified into something dense, like a large inline SVG or base64 blob.
Vary: Accept-Encoding
This header tells caches that the response differs by encoding. Without it, a CDN or proxy can store the Brotli version and hand it to a client that only understands gzip, or store the uncompressed version and serve it to everyone.
Files not compressed
Text files on the page that came back without Content-Encoding. Images, fonts and video are excluded on purpose: they are compressed by their own format.
Gzip vs Brotli
Gzip | Brotli | |
|---|---|---|
Typical size of a text file after compression | 25–30% of original | 20–25% of original |
Browser support | All browsers | All browsers except Internet Explorer. HTTPS only |
Server support | Built into Nginx, Apache, every CDN | Module for Nginx, built into Apache 2.4.26+, on by default on most CDNs |
Header value |
|
|
A newer format, Zstandard (zstd), is now supported by Chrome and Firefox. It compresses about as well as Brotli at mid levels and faster. It is worth watching, but Brotli plus gzip remains the safe default.
How to enable compression
Pick the layer that serves your files. If a CDN sits in front of your server, it can compress for you, but the origin should still compress so that cache misses are not sent raw.
# gzip
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_types text/plain text/css application/javascript application/json image/svg+xml application/xml;
# brotli (requires ngx_brotli)
brotli on;
brotli_comp_level 5;
brotli_static on;
brotli_types text/plain text/css application/javascript application/json image/svg+xml application/xml;
<IfModule mod_brotli.c>
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css \
application/javascript application/json image/svg+xml
BrotliCompressionQuality 5
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/css \
application/javascript application/json image/svg+xml
</IfModule>
What not to compress
Compress anything that is text: HTML, CSS, JavaScript, JSON, XML, SVG, plain text and web app manifests. Skip files under about 1 KB, where headers outweigh the savings.
Leave these alone:
JPEG, PNG, WebP and AVIF images
WOFF2 fonts (WOFF2 already uses Brotli inside)
Video and audio
ZIP, PDF and other archives
NOTE: Compressing an already compressed file wastes CPU and can make it slightly larger. The checker leaves these types out of the "files not compressed" count.
Why compression isn't working
You turned it on, and the checker still says none. These are the usual reasons, roughly in order of how often we see them.
The CDN or proxy strips or skips it
A load balancer or proxy decompresses responses to inspect them and does not compress them again. Test the origin directly, then each layer in front of it, to find where the header disappears.
The content type is not in the list
Gzip and Brotli settings compress only the types you list. A JSON API returning application/json or a script served as text/javascript is skipped if that exact type is missing.
Brotli is requested only over HTTPS
WARNING: Browsers send
brinAccept-Encodingonly on HTTPS connections. On plain HTTP you will always see gzip or nothing, even with Brotli configured correctly.
The cache stored the wrong version
Without Vary: Accept-Encoding, a cache can keep one copy and send it to everyone. If the first visitor was a bot that didn't ask for compression, every visitor after it gets the raw file.
Compression broke after a change
A new CDN, a platform migration, a server image rebuilt from an older template. Compression rarely gets switched off on purpose. It gets lost in a change nobody connected to it.
How to check compression manually
Ask for Brotli with curl. Run the command below and look for
content-encoding: brin the output. Swapbrforgzipto test the fallback.Look in DevTools. Open the Network tab, reload, right-click the column header and enable Content-Encoding. Compare the Size (transferred) and Resources (original) columns at the bottom.
curl -sI -H "Accept-Encoding: br, gzip" https://example.com | grep -i -E "content-encoding|vary"
Questions about compression
Is gzip or Brotli better?
Brotli makes text files 15–25% smaller than gzip. Serve Brotli to browsers that ask for it and keep gzip as the fallback.
Does compression improve Core Web Vitals?
It cuts download time for HTML, CSS and JavaScript, which helps LCP and, on slow connections, FCP. It does nothing for images, which are often the LCP element.
Does compression slow down my server?
At mid levels the CPU cost is small next to the network time it saves. Use high Brotli levels only for files compressed once at build time.
Why does the checker show gzip when I enabled Brotli?
The most common causes are plain HTTP, a CDN or proxy in front that re-encodes the response, or a content type missing from your Brotli settings.
Should I compress images and fonts?
No. JPEG, PNG, WebP, AVIF and WOFF2 are already compressed. Compressing them again wastes CPU and saves nothing.
What is zstd and should I use it?
Zstandard is a newer format supported by Chrome and Firefox. It is fast and compresses well, but Brotli plus gzip covers more clients today.