How to Check if Gzip or Brotli Compression Is Enabled
To check if gzip is enabled, request the page with an Accept-Encoding header and look at the response: Content-Encoding: gzip (or br for Brotli, zstd for Zstandard) means compression is on. The quickest way is the free gzip and Brotli compression check: it requests the URL twice — with and without compression — and shows the algorithm, both sizes and the percentage saved. Compression makes HTML, CSS and scripts several times smaller with a single server setting.
How to Check if Gzip Is Enabled: Three Ways
- Online. Paste the URL into the compression check. A lit GZIP or Brotli badge means compression is on; for HTML, savings of 70–90% are normal. No badge but a much smaller transferred size usually means the server answered with zstd — Cloudflare does this, for example.
- curl. Run
An empty result means the page came back uncompressed. Swapcurl -s -o /dev/null -D - -H 'Accept-Encoding: gzip' https://example.com/ | grep -i content-encodinggzipforbrto test Brotli. Use a GET request as above, not-I: some servers skip compression on HEAD. - Browser. Open DevTools → Network, reload, click the document request and find
content-encodingunder Response Headers. The Size column shows transferred bytes next to the full resource size.
Only the URL you test is checked. Enter direct links to a stylesheet and a script too: often HTML is compressed while CSS and JS are not.
What the check shows
- Is compression enabled and which algorithm is used.
- Original and compressed size — the gain is immediately visible.
- Which file types are compressed. Often only HTML is configured, while styles and scripts are forgotten.
- Is anything unnecessary not compressed — compressing images and archives is pointless, they are already compressed.
Why this is more important than it seems
Text files are compressed three to five times. For the visitor, this is a direct reduction in loading time, especially on mobile networks. The setting is done once at the server level and applies to the entire site — in terms of effort and effect, this is one of the best ways to speed up.
| File Type | Compress? |
|---|---|
| HTML, CSS, JavaScript | Yes, definitely |
| JSON, XML, sitemap | Yes |
| SVG | Yes — it’s text |
| JPEG, PNG, WebP | No, already compressed |
| Video, archives, PDF | No |
How much this gives in numbers
A typical HTML page weighing 200 KB after compression takes 30–50 KB, a stylesheet of 150 KB — about 25 KB. For a visitor on a mobile network, this is the difference between instant loading and a couple of seconds of waiting. Moreover, the savings are repeated with every visit of each visitor, unlike one-time optimizations like compressing a single image.
Why compression is sometimes intentionally disabled
There are rare cases: streaming very large responses or saving CPU on a weak server. For a regular site, these considerations do not apply — modern algorithms are cheap in load, and the traffic gain far outweighs the costs.
If compression is not enabled
- Check if a proxy or content delivery network in front of the site is interfering.
- Ensure that the necessary file types are listed in the server configuration.
- Check if the application is returning a ready response bypassing the server.
- Recheck the result and also look at the page load speed.