Compression detector. Gzip vs Brotli truth.
Paste HTTP response headers. The detector reads Content-Encoding (gzip / br / deflate / zstd / identity), validates the Vary: Accept-Encoding header, and recommends the right compression strategy. Browser-only.
How to get headers showing compression
- curl with Accept-Encoding:
curl -I -H "Accept-Encoding: br, gzip" https://example.com(must send the request header to receive Content-Encoding back) - DevTools: F12 → Network → click the document request → Headers panel → look at Response Headers
Without Accept-Encoding in your request, most servers will serve uncompressed responses.
Sources used
- RFC 9110 §8.4 Content-Encoding, canonical HTTP semantics
- RFC 7932 Brotli compressed data format
- RFC 8878 Zstd compression specification
- MDN Content-Encoding header reference
- MDN Vary header reference
- web.dev compression guide, performance impact + setup
No data is sent to any external service. Detection happens entirely in your browser by parsing the Content-Encoding and Vary headers from your pasted text.
Privacy: parsing happens in your browser. Nothing is sent or logged.
How to use the Compression Detector
This detector reads raw HTTP response headers and tells you whether a response was compressed, and with which algorithm. It looks for the Content-Encoding and Vary headers in the text you paste, checks that the two agree, and suggests the next change to make. Use it when you are checking a server, CDN or hosting setup for page speed.
Step by step
-
Get the response headers
Run curl -I -H "Accept-Encoding: br, gzip" followed by the page address, or open DevTools, select the document request on the Network tab and copy its Response Headers. Open How to get headers showing compression for the same two methods.
-
Paste them into the box
Paste the headers into the large box. The result panel updates as you paste or type, so there is nothing to press.
-
Or load a sample
To see each kind of result, press Brotli + Vary (good), Gzip only, No compression or Missing Vary. Press clear to empty the box.
-
Read the verdict and evidence
The verdict names the algorithm and says whether the response is compressed. Under encoding evidence you see the Content-Encoding value the tool found, plus the Content-Length in bytes when the headers include one.
-
Check Vary and the recommendation
The Vary header check says whether caches are told that the response depends on Accept-Encoding. The recommendation gives the next step for the algorithm you are on, such as adding Brotli next to gzip.
Reading the result
- br reads as Brotli, gzip as Gzip, deflate as Deflate and zstd as Zstd (Zstandard). When there is no Content-Encoding line at all, the verdict is No compression (identity). Brotli, Gzip and Zstd show in green; Deflate and no compression show in amber.
- Worked example: the Brotli + Vary (good) sample reads Brotli, compressed, with Content-Encoding: br and Content-Length: 14,328 bytes as evidence, and a passing Vary check.
- In the Vary header check, a tick means Vary includes Accept-Encoding. MISSING means there is no Vary header, so a cache could hand a compressed copy to a client that did not ask for one. INCOMPLETE means Vary exists but leaves out Accept-Encoding.
- When nothing is compressed the Vary check shows N/A, because Vary only matters once a compressed copy exists.
- Only the first value of Content-Encoding is read. An encoding other than br, gzip, deflate or zstd gets the No compression (identity) name and advice, even though the verdict line still says compressed and the Vary check still runs.
Tips and common mistakes
- Send Accept-Encoding with your request. A plain curl -I usually gets an uncompressed reply, so the tool reports No compression even when the site compresses for browsers.
- Paste one response at a time. With a redirect chain, the tool reads the first Content-Encoding and the first Vary line it finds, which may belong to the redirect and not the final page.
- Each header has to sit on one line as name: value. If your DevTools view puts names and values on separate lines, switch to the raw view before you copy.
- Test the HTML page and a large CSS or JavaScript file separately, because servers can be set to compress some file types and not others.
- Images, video and WOFF2 fonts are already compressed, so No compression on those files is normal and not a problem.
Privacy and limits
The tool only parses the text you paste, in your browser. It does not contact the site, so it cannot test a URL on its own, and it sends nothing to any server. Nothing you paste is stored.
Brotli or gzip but never neither.
HTTP compression cuts text-payload transfer size by 60-85%, with direct impact on TTFB and LCP. Brotli (Content-Encoding: br) compresses 15-25% better than gzip for HTML and CSS; modern setups ship both with content-negotiation via the Accept-Encoding request header. The detector above identifies which algorithm is in use, validates the Vary: Accept-Encoding header (a critical caching correctness check), and recommends the next move. The most common production bug it catches is missing Vary, which leads to mis-cached responses serving compressed content to clients that did not request it.
Three rules for HTTP compression. One, ship both Brotli and gzip, Brotli for clients that signal br, gzip fallback for legacy. Two, always include Vary: Accept-Encoding alongside Content-Encoding so caches know to vary the cached response. Three, do NOT compress already-compressed payloads (images, video, .gz/.br files), wastes CPU with zero size reduction. The web.dev compression guide is the canonical setup reference.
Tools in the same cluster: CDN Detector for the edge-tier identification (most CDNs auto-handle compression). Cache Headers Checker for the broader caching audit. HTTP Headers Checker for the full headers grade.
Five answers.
What does HTTP compression do?
HTTP compression reduces transfer size of text-based responses (HTML, CSS, JS, JSON, SVG) by 60-85% before sending over the wire. The browser decompresses on receive. The savings translate directly to faster page loads, reduced bandwidth costs, and lower TTFB on slow connections. The Content-Encoding response header names the algorithm used (gzip, br for Brotli, deflate, zstd, identity for none).
Brotli vs Gzip, which is better?
Brotli (br) compresses 15-25% better than Gzip on text payloads, particularly HTML and CSS. The trade-off: Brotli is slower at the highest compression levels, so most servers use Brotli at level 4-6 (vs gzip-equivalent ratio with faster encoding). Modern setup ships both, Brotli to clients that send Accept-Encoding: br (modern browsers), Gzip fallback for legacy. The detector above flags single-encoding setups where adding Brotli is the easy win.
What about Zstd (zstandard)?
Zstd is Facebook-developed compression that hits Brotli-level ratios with significantly faster encoding speed. Browser support reached general availability in Chrome 118 (Sept 2023) and Firefox 126 (May 2024). Server support is rolling in via nginx, Apache, Cloudflare, Fastly. For high-traffic origins where compression CPU cost matters, Zstd is increasingly the right answer. For most sites, Brotli + Gzip stack remains the default.
Why is the Vary header important?
Vary: Accept-Encoding tells caches (browser cache, CDN) that the response varies based on the Accept-Encoding request header. Without Vary, a CDN might cache the gzipped response and serve it to a client that requested Brotli (or vice versa), or worse, serve a compressed response to a client that doesn't support compression. Always ship Vary: Accept-Encoding alongside Content-Encoding. The detector above flags missing Vary as a caching bug.
Does this tool save my data?
No. Header parsing happens in your browser. Nothing is sent to any server. Closing the tab clears the data. The Copy Results button puts a plain-text summary on your clipboard.
Uncompressed in production?
Our web development engagements ship Brotli + gzip with Vary correctness, audit Cache-Control + ETag for downstream caching, and deliver Core Web Vitals lift in under 2 weeks.
Published .