Gzip, Brotli and Zstd Compression Test
Check whether a URL is served with gzip, Brotli or Zstandard compression and how many bytes each one saves. Free online gzip and brotli test.
Runs on our server: what you enter is used for the lookup, not stored.
This check runs from our server, not from your browser, and is rate limited. Nothing you enter is stored. Private and internal addresses are refused on purpose.
What this tool is for
Text compression is the single cheapest performance win available: one server setting, typically 60 to 80 percent off HTML, CSS and JavaScript. This requests the page four times, uncompressed and then separately with gzip, Brotli and Zstandard, and shows which ones the server supports and how many bytes each saves. This is one of the few tools here that needs a server, because the question is about the internet rather than about your data. The request is made from our server, rate limited, and nothing you enter is stored.
Gzip, Brotli and Zstandard: what the test checks
A browser announces which compression formats it understands in the Accept-Encoding header, and the server picks one. Checking with a single request only shows the server choice. This test asks for each format separately, plus once with no compression, so you see exactly which ones the server supports and how many bytes each saves.
Gzip is supported everywhere and is the baseline. Brotli, supported by every current browser over HTTPS, usually produces text 15 to 25 percent smaller than gzip at comparable speed. Zstandard is the newest, supported by Chromium based browsers and Firefox, and is attractive for dynamic responses because it compresses very fast.
How to turn compression on
Nginx: gzip on; plus a gzip_types line listing text/css, application/javascript, application/json and image/svg+xml, since text/html is included by default. Brotli needs the ngx_brotli module.
Apache: enable mod_deflate for gzip and mod_brotli for Brotli, then add an AddOutputFilterByType line for the same text types.
Caddy: the encode directive, for example encode zstd gzip, turns on both in one line.
Cloudflare and most CDNs compress text automatically between the edge and the visitor, even if your origin does not. If this test reports no compression on a site behind a CDN, check whether the response carries a Cache-Control: no-transform header, which tells the CDN not to touch it.
What should and should not be compressed
Compress text: HTML, CSS, JavaScript, JSON, XML, SVG, plain text and web fonts in the older TTF and OTF formats. Do not compress JPEG, PNG, WebP, AVIF, MP4, WOFF2 or ZIP files: they are already compressed, a second pass saves nothing and costs CPU on every request. Very small responses, under about 1 KB, are not worth compressing either.
If the result shows compression working but saving less than 50 percent on an HTML page, the server is probably using a low compression level. Gzip level 5 or 6 and Brotli level 4 to 6 are the usual sweet spot for responses generated on the fly; static files can be precompressed once at the highest level.
How to use it
- Enter a URL.
- See which encodings the server supports: gzip, Brotli, Zstandard.
- Compare the sizes to see what each one is buying you.
Frequently asked questions
Gzip or brotli?
Brotli is smaller, typically by another 15 to 20 percent on text, and is supported everywhere that matters. Serve brotli with gzip as the fallback: most servers and CDNs do both with one setting.
Should images be compressed too?
No. JPEG, PNG and WebP are already compressed, and running gzip over them wastes CPU for nothing. Compress text: HTML, CSS, JavaScript, JSON and SVG.
What is zstd and should I enable it?
Zstandard is a newer format that compresses about as well as Brotli but much faster, which suits pages generated on every request. Chromium based browsers and Firefox accept it. Enable it alongside Brotli and gzip, never instead of them: the server picks whichever the browser asks for.