CSS Portal

Check GZIP Compression

Check whether a website sends its pages compressed. Enter an address and the tool requests the page with each encoding, GZIP, Brotli, Zstandard and Deflate, and shows which ones the server supports, the uncompressed and compressed sizes, and how much is saved on every visit. It also checks the Vary header and gives tips if something needs fixing.

Compression typically makes HTML, CSS and JavaScript 60–80% smaller, so pages load faster, especially on mobile connections. If it isn't on yet, the guide below shows how to enable it on Apache, Nginx and IIS.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Checks GZIP, Brotli, Zstandard and Deflate in one go. Only public addresses can be checked.

How to turn on GZIP

Choose your server and add the settings below. Reload the server, then run the check above again to confirm.

Apache

  1. Make sure mod_deflate is loaded. Most hosts already have it on, but if not, add this to httpd.conf.

    httpd.conf
    LoadModule deflate_module modules/mod_deflate.so
  2. Choose which file types to compress. This can go in httpd.conf or .htaccess. mod_deflate also adds the Vary: Accept-Encoding header for you.

    .htaccess
    <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
      AddOutputFilterByType DEFLATE application/javascript application/json application/xml image/svg+xml
    </IfModule>

Nginx

  1. Add these settings to the http block in nginx.conf. HTML is compressed by default, so the list only needs the other types.

    nginx.conf
    gzip on;
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_min_length 256;
    gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml application/xml+rss;
  2. Test the config, then reload Nginx.

    Terminal
    sudo nginx -t && sudo systemctl reload nginx

IIS

  1. Open IIS Manager, select your site, open Compression and tick both Static and Dynamic content compression.

  2. Prefer to configure it in code? Add this to your site's web.config instead.

    web.config
    <system.webServer>
      <urlCompression doStaticCompression="true" doDynamicCompression="true" />
    </system.webServer>

Brotli

  1. Apache 2.4.26 or later: enable mod_brotli and add these lines next to the GZIP settings. Browsers that support Brotli get it; the rest still get GZIP.

    .htaccess
    <IfModule mod_brotli.c>
      AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css
      AddOutputFilterByType BROTLI_COMPRESS application/javascript application/json application/xml image/svg+xml
    </IfModule>
  2. Nginx: install the ngx_brotli module (many distributions package it as libnginx-mod-brotli), then add this to the http block.

    nginx.conf
    brotli on;
    brotli_comp_level 6;
    brotli_types text/plain text/css text/xml application/javascript application/json application/xml image/svg+xml;
  3. Cloudflare and other CDNs compress with Brotli automatically. Check the speed or compression settings in your CDN's dashboard.

About this tool

How it works

This tool shows how a web server compresses its pages. It requests the address you enter once for each encoding a browser can ask for, and records the size of the bytes the server actually sends. Nothing is decompressed or estimated, so you see the real transfer sizes for GZIP, Brotli, Zstandard and Deflate next to the uncompressed page.

Redirects and headers

Redirects are followed, so example.com is checked at the address it finally ends up on, usually https://www.example.com/. The result also shows the status code, content type, server, any CDN in front of the site and the Vary header. That header matters: without Vary: Accept-Encoding, a shared cache can send a compressed page to a client that can't read it.

What is checked

Only the HTML page you enter is checked, not the images, stylesheets and scripts it loads. To check a stylesheet or script, enter its own address.

Private and public sites

Only public websites can be checked, and the page is fetched by CSS Portal's server, not stored.

Frequently Asked Questions

Does this tool check Brotli and Zstandard too?

Yes. The page is requested separately with GZIP, Brotli (br), Zstandard (zstd) and Deflate, and once without compression, so you can see which encodings the server supports and how big each response is. Browsers ask for all of them, and the server picks the one it prefers, usually Brotli when it's available.

What is GZIP compression?

GZIP is a file compression format used by web servers to reduce the size of files before sending them to a visitor's browser. When a browser requests a page, the server compresses the HTML, CSS, JavaScript, and other text-based files on the fly and sends the smaller compressed version. The browser then decompresses them automatically before rendering the page. The entire process takes only milliseconds and is completely invisible to the user, while typically reducing file sizes by 50% to 80%.

How does GZIP compression improve website performance?

By compressing files before they leave the server, GZIP dramatically reduces the amount of data that needs to travel across the network. Smaller files transfer faster, which means the browser can begin rendering the page sooner. For a typical webpage, enabling GZIP can reduce the total transfer size by over half, cutting load times noticeably — especially for users on slower connections or mobile networks. Faster load times also contribute directly to better Core Web Vitals scores and improved search engine rankings.

Does GZIP compression affect SEO?

Yes, indirectly but meaningfully. Page speed is a confirmed ranking factor for Google, and GZIP compression is one of the most effective ways to improve it. Faster pages score better on Core Web Vitals metrics such as Largest Contentful Paint (LCP), which Google uses as part of its ranking signals. Google's own PageSpeed Insights and Lighthouse tools will flag missing GZIP compression as a performance issue and recommend enabling it. In short, enabling GZIP will not boost rankings on its own, but it removes a performance bottleneck that is holding your scores back.

What is the difference between GZIP and Brotli compression?

Both are server-side compression algorithms, but Brotli is newer and generally achieves better compression ratios than GZIP — typically 15% to 25% smaller output for text-based files. Brotli is supported by all modern browsers and is the preferred choice when available. GZIP has near-universal support including older browsers, making it the safe fallback. Most web servers can be configured to serve Brotli to browsers that support it and fall back to GZIP for those that do not. If your server supports both, enabling Brotli alongside GZIP gives you the best of both worlds.

Which file types should be compressed with GZIP?

GZIP is most effective on text-based file types, where it achieves the highest compression ratios. These include HTML (text/html), CSS (text/css), JavaScript (application/javascript), JSON (application/json), XML, SVG, and plain text files. Images (JPEG, PNG, WebP, GIF) and binary formats like PDF, ZIP, or video files are already compressed and gain little or nothing from GZIP — in some cases the compressed output can even be slightly larger. Configure your server to only compress the text-based MIME types and leave pre-compressed formats alone.

How do I check if GZIP is enabled on my website?

The easiest way is to use this tool: enter your address and it sends requests with Accept-Encoding headers for each type of compression and checks the Content-Encoding header in each response. You can also check manually in your browser's developer tools: open the Network tab, reload the page, click on any HTML or CSS request, and look in the Response Headers for content-encoding: gzip or content-encoding: br (Brotli). If neither header is present, compression is not enabled.

How do I enable GZIP compression on Apache?

Enable the mod_deflate module and add compression rules to your .htaccess file or httpd.conf. The key directive is AddOutputFilterByType DEFLATE followed by the MIME types you want to compress, such as text/html, text/css, and application/javascript. Most shared hosting environments have mod_deflate available by default, so adding the .htaccess rules is usually all that is needed. After making changes, use this tool or your browser's developer tools to confirm compression is working.

How do I enable GZIP compression on Nginx?

Add gzip on; to your nginx.conf file inside the http block, then specify the MIME types to compress using gzip_types. Key settings to include are gzip_vary on (which adds a Vary: Accept-Encoding header for correct caching behaviour), gzip_comp_level (6 is a good balance between compression ratio and CPU cost), and gzip_min_length to avoid compressing very small files where the overhead outweighs the saving. Restart Nginx after making changes with sudo systemctl restart nginx.

Why is GZIP compression not working even though I enabled it?

Several things can silently prevent GZIP from working. A CDN or proxy sitting in front of your server may be stripping the Content-Encoding header or serving cached uncompressed responses — check whether the CDN has its own compression setting that needs enabling. On Apache, the mod_deflate module may not be loaded, or the .htaccess rules may be overridden by the main server configuration. On Nginx, missing gzip_types means only text/html is compressed by default. Some server configurations also exclude requests that do not send an Accept-Encoding header, though all modern browsers send this automatically. After any configuration change, clear your CDN cache and retest with this tool.

Does GZIP compression use extra server CPU?

Yes, compressing files on the fly does use CPU, but in practice the overhead is negligible for most websites. The compression happens in microseconds and modern servers handle it without measurable impact on response times. You can also tune the compression level — lower levels (1–3) use less CPU with slightly less compression, while higher levels (7–9) compress more aggressively but take marginally longer. Level 6 is the widely recommended default as it offers an excellent balance between compression ratio and CPU cost. For very high-traffic static assets, serving pre-compressed .gz files removes the CPU cost entirely, since no on-the-fly compression is needed.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee