HTTP Compression Test

Test if a website supports Brotli or Gzip compression. Check compression ratios and potential bandwidth savings.

Enter a URL to check Gzip and Brotli compression support.

What is HTTP compression?

HTTP compression reduces the size of data transferred between servers and browsers. Text-based content like HTML, CSS, JavaScript, and JSON compresses extremely well -often 70-90% smaller than the original.

When a browser requests a page, it sends an Accept-Encoding header listing supported compression algorithms. If the server supports one, it compresses the response and indicates which algorithm was used in the Content-Encoding header. The browser then decompresses the content before rendering.

Gzip vs Brotli

Gzip has been the standard compression algorithm for the web since the late 1990s. It’s universally supported and offers good compression ratios with fast compression and decompression speeds.

Brotli is a newer algorithm developed by Google, specifically designed for web content. It typically achieves 15-25% better compression than Gzip at equivalent speeds, though maximum compression levels are slower.

AlgorithmBrowser SupportCompression RatioSpeed
GzipUniversal (99%+)GoodFast
BrotliModern browsers (95%+)Better (15-25% smaller)Fast to moderate

Most modern setups serve Brotli to browsers that support it and fall back to Gzip for older clients.

What should be compressed?

Compress: HTML, CSS, JavaScript, JSON, XML, SVG, web fonts (TTF, OTF), plain text.

Don’t compress: Images (JPEG, PNG, WebP, GIF), videos, PDFs, and other binary formats. These are already compressed -re-compressing wastes CPU and may even increase file size.

Compression levels

Both Gzip and Brotli support multiple compression levels trading CPU time for smaller output:

  • Level 1-3 - Fast compression, moderate size reduction. Good for dynamic content compressed on-the-fly.
  • Level 4-6 - Balanced. Common default for most servers.
  • Level 7-9 (Gzip) / 7-11 (Brotli) - Maximum compression, slower. Best for static assets compressed once and served many times.

For static sites on a CDN, use maximum compression -the assets are compressed at build time and served from cache.

How to enable compression

QuantCDN automatically compresses eligible content with Brotli and Gzip. No configuration required -responses are compressed at the edge based on the browser’s Accept-Encoding header.

Nginx - Add gzip on; and brotli on; (with ngx_brotli module) to your config.

Apache - Enable mod_deflate for Gzip. Brotli requires mod_brotli (Apache 2.4.26+).

Node.js - Use compression middleware for Gzip or shrink-ray-current for Brotli.

How this tool works

Enter a URL to test whether the server returns compressed responses. This tool makes requests with different Accept-Encoding headers to detect Gzip and Brotli support, and reports the compression ratio achieved. Powered by a QuantCDN Edge Function.