GZIP Compression Test
Check whether a web page is served with compression such as gzip or Brotli.
Looks up live data What you enter is sent to our server to fetch live results from public sources. Results are cached briefly. A Cloudflare Turnstile bot check runs when you press the button (it loads a script from challenges.cloudflare.com and may show a short challenge).
A Cloudflare Turnstile bot check runs when you press the button (it loads a script from challenges.cloudflare.com and may show a short challenge).
Report a problem with this tool
About this tool
The tool requests your page while advertising support for gzip, deflate and Brotli, then reports the Content-Encoding header the server sent back: gzip, br, deflate, or none. It also shows the final URL after redirects, the status code and the content type. Our server makes the request, so the address you enter is sent to us. The byte size shown is the decoded size, not what travelled over the network, so it is not a measure of savings. Results are cached for about ten minutes, so a recent configuration change may not show immediately.
How to use it
- Enter the page address, with or without https://.
- Press Test compression.
- Read the encoding: none means the response was not compressed.
- If it is none, enable compression on your server or CDN and test again after the cache expires.
How a gzip check works
A browser tells the server which compression it accepts in the Accept-Encoding request header. If the server compresses the response, it says so in the Content-Encoding response header. This tool sends Accept-Encoding: gzip, deflate, br and reports the Content-Encoding value it gets back.
The request is made from our server, not your browser, so the result shows what the public server returns for that address.
Reading the result
- gzip
- Compression is on. Gzip is supported by every current browser.
- br
- Brotli is on. It usually makes text files smaller than gzip, and servers fall back to gzip for clients that do not accept it.
- deflate
- An older method. It works, but gzip or Brotli is the usual choice today.
- none
- The response was sent uncompressed. For HTML, CSS and JavaScript this is worth fixing. Images such as JPG and PNG are already compressed, so none is normal for them.
Turning compression on
On nginx, gzip is switched on in the http or server block. HTML is compressed by default once it is on; other types need gzip_types. On Apache, mod_deflate does the same with AddOutputFilterByType. Most CDNs, Cloudflare included, can compress for you at the edge. Reload the server and test again after about ten minutes, when our cached result expires.
# nginx gzip on; gzip_types text/css application/javascript application/json image/svg+xml; # Apache (.htaccess or vhost) AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json
Common problems
- Result says none but compression is enabled
- Compression may be applied only to some content types, or only to larger files. Test an HTML page rather than an image.
- Old result after a change
- Results are cached for about ten minutes; wait and retest.
- The URL is refused
- Internal addresses and ports other than 80, 443, 8080 and 8443 are blocked.
Frequently asked questions
How can I check gzip from the command line?
Run curl -s -o /dev/null -D - -H "Accept-Encoding: gzip, br" https://example.com and look for a Content-Encoding line in the headers it prints. No such line means the response was not compressed.
Does the size shown tell me how much I save?
No. The size is measured after the response is decompressed, so it is the full page size, not the number of bytes sent over the network.
Should I compress images with gzip?
Usually not. JPG, PNG, WebP and similar formats are already compressed, so gzip gains little. SVG is text and does compress well.