SMThe SERP MasterAdvanced SEO Tools

Compression & Content-Encoding Checker

See whether a page is actually served compressed (gzip/Brotli) by reading the real Content-Encoding header from the response.

How HTTP Compression Works and How to Check It

Enter a URL and this tool requests it the way a current browser does — offering gzip, deflate, Brotli and zstd — then reads the Content-Encoding header the server sends back. That header is the only reliable evidence of which compression, if any, was actually used.

HTML, CSS and JavaScript compress extremely well; gzip or Brotli typically cut 60–80% off a text response's transfer size. A text page served without compression is one of the easiest speed fixes there is, and usually a single line of server configuration.

How to Use This Tool

  1. Enter the URL

    Test the page itself, or paste the URL of a CSS or JavaScript file to check it directly.

  2. Run the check

    The request follows redirects and reports on the final response.

  3. Read the result

    The algorithm used (br, gzip, zstd or deflate), whether Vary: Accept-Encoding is set, and the reported size.

  4. Fix and re-test

    Enable compression at the server or CDN, then run the check again to confirm the header appears.

How Compression Is Negotiated

Every browser request carries an Accept-Encoding header listing the formats it can decode — a current Chrome sends gzip, deflate, br and zstd. The server picks one it supports, compresses the response, and names its choice in the Content-Encoding header. The browser decompresses it transparently.

That means compression is a conversation, not a setting you can see in the HTML. A server that supports Brotli will still send gzip to a client that did not ask for Brotli, which is why this tool offers the same list a browser does rather than a minimal one.

Gzip vs Brotli vs Zstandard

  • Gzip — supported by every browser and server for decades. The universal fallback.
  • Brotli (br) — developed by Google and supported by all modern browsers. It typically produces files 15–20% smaller than gzip for text, which is why it is the better default when available.
  • Zstandard (zstd) — a newer format from Meta, supported by Chrome and Firefox since 2024. It compresses quickly with ratios close to Brotli, and some CDNs have started offering it.
  • Deflate — an older format that is rarely used on its own now; gzip is built on the same algorithm.

How to Enable Compression

On most hosting it is a configuration change at the web server or CDN, not something to build into application code.

  • Apache — enable mod_deflate for gzip, and mod_brotli for Brotli where it is available, then list the text MIME types to compress.
  • Nginx — set gzip on and add gzip_types for CSS, JavaScript, JSON and SVG. Brotli needs the separate ngx_brotli module.
  • Cloudflare and most CDNs — Brotli and gzip are applied at the edge automatically for text responses.
  • WordPress — many caching plugins add the Apache rules for you; managed WordPress hosts usually compress by default.
  • Node.js — let the reverse proxy or CDN in front of the app handle it rather than compressing in the application.

What Should and Should Not Be Compressed

Compress text: HTML, CSS, JavaScript, JSON, XML, SVG and plain text. These shrink dramatically.

Do not compress formats that are already compressed — JPEG, PNG, WebP, AVIF, most video, PDF and WOFF2 fonts. Compressing them again saves almost nothing and costs server CPU, so a missing Content-Encoding on an image is expected rather than a bug.

Very small responses are also often left uncompressed on purpose, because the overhead can outweigh the saving below a kilobyte or so.

Compression and Page Speed

Smaller transfers arrive sooner, which helps the metrics that depend on the first bytes of HTML, CSS and JavaScript — Largest Contentful Paint in particular. Lighthouse flags uncompressed text resources with its “enable text compression” audit.

Compression is only one part of page weight, though. The Page Weight Checker shows every resource a page downloads and what it costs, and the Core Web Vitals Checker shows whether it adds up to a real speed problem.

Frequently Asked Questions

How do I know if gzip is enabled on my site?

Look for a Content-Encoding header in the response. If it says gzip, br or zstd, the response was compressed. This tool reads that header for you; in a browser you can see it in the Network tab of the developer tools.

Is Brotli better than gzip?

For text, usually yes — Brotli files are typically 15–20% smaller at similar decompression speed, and every modern browser supports it. Keep gzip enabled as the fallback for older clients.

Should every response be compressed?

No. Only text-based formats benefit. Images, video, PDFs and WOFF2 fonts are already compressed and should not be compressed again.

What does the Vary header have to do with this?

Vary: Accept-Encoding tells caches between the server and the visitor to store compressed and uncompressed versions separately, so a client that cannot decode a format is never served it by mistake.

Why does the tool show compression but PageSpeed says to enable it?

This check tests one URL — usually the HTML. PageSpeed Insights checks every text resource the page loads, so the page may be compressed while a stylesheet or script from another server is not. Paste those file URLs here to check them individually.