Gzip and Brotli compression checker

Is your HTML compressed, and by how much? We fetch the page three ways (Brotli, gzip, none) and compare what actually crosses the wire.

How HTTP compression is negotiated

The browser lists what it can decode in the Accept-Encoding request header, for example gzip, deflate, br, zstd. The server picks one, compresses the body and says which in Content-Encoding. It should also send Vary: Accept-Encoding so caches keep compressed and uncompressed copies apart.

EncodingTokenNotes
BrotlibrRFC 7932. Supported by all current browsers over HTTPS; usually smallest for text at web settings.
gzipgzipRFC 1952. Universal fallback; every client supports it.
ZstandardzstdRFC 8878. Newer; offered by recent Chromium and Firefox versions.

Turning it on

  • CDN: Cloudflare, Fastly, CloudFront, Vercel and Netlify compress text responses automatically or with one setting.
  • nginx: gzip on; plus gzip_types for CSS, JS, JSON and SVG; Brotli needs the ngx_brotli module.
  • Apache: mod_deflate for gzip, mod_brotli for Brotli.
  • Static builds: pre-compress files at build time (.br and .gz) so the server never compresses on the fly.

Compression reduces download time; it doesn't help a slow server. For that, look at TTFB and whether a CDN cache is answering. Total weight by file type is in the page size checker.

Questions developers ask

How do I check if gzip compression is enabled?

Request the page with an Accept-Encoding header that offers gzip and look for Content-Encoding: gzip in the response. This checker does that three times (offering Brotli, gzip and no compression) and compares the bytes on the wire, so you can see not just whether compression is on but how much it saves.

Is Brotli better than gzip?

For text, usually yes: Brotli at its default web settings typically produces smaller HTML, CSS and JavaScript than gzip, and every current browser supports it over HTTPS. Servers keep gzip as the fallback for clients that don't send "br" in Accept-Encoding.

Which files should be compressed?

Text formats: HTML, CSS, JavaScript, JSON, SVG, XML and plain text. Already-compressed formats such as JPEG, PNG, WebP, AVIF, WOFF2, MP4 and ZIP gain almost nothing and only cost CPU, so servers normally skip them.

Why does my page show no compression?

Common causes: compression is not enabled in the web server or CDN, the response is smaller than the server's minimum size, a proxy strips the Content-Encoding, or the content type is not on the server's list of compressible types. Check the content-type row in the result.

Does compression affect page speed a lot?

For HTML, CSS and JavaScript it is one of the cheapest big wins: text often shrinks to a fraction of its size, so it downloads in fewer round trips. The website speed test on this site flags every text file served without compression.