HomeAPI StatusFree ToolsSEO Help Articles

Brotli Analysis Test

The Brotli Compression Test verifies whether your server or CDN is serving HTML, CSS and JavaScript with Brotli compression — the modern standard that produces 15-25% smaller files than gzip with universal browser support since 2017. Many sites are still on gzip-only because their origin server defaulted to it, leaving meaningful bandwidth and load-time savings on the table. This test confirms Brotli is enabled per asset type and reports the ratio achieved.

What This Tool Checks

  • Content-Encoding: br header on the HTML response
  • Brotli on CSS files
  • Brotli on JavaScript files
  • Brotli on JSON / API responses
  • Brotli quality level (1-11) achieved
  • Vary: Accept-Encoding header
  • Comparison to gzip-equivalent size

Why It Matters for SEO

Brotli is meaningfully better than gzip on text content. Real-world ratios are 15-25% smaller for HTML, CSS and JS, and the algorithm has near-universal browser support since 2017. Switching from gzip to Brotli is a free, one-time deploy that immediately speeds up every text asset on your site. CDNs (Cloudflare, Fastly, CloudFront, Vercel) all support Brotli with a single setting.

How to Fix It

Enable Brotli at your CDN for all text MIME types (HTML, CSS, JS, JSON, SVG). Use static Brotli quality 11 for static assets at build time, dynamic Brotli quality 4 for HTML on-the-fly. Set Vary: Accept-Encoding. Re-test until every text asset returns Content-Encoding: br.

How It Works

We send the request with Accept-Encoding: br, gzip, then inspect the Content-Encoding header on the response. Each asset type (HTML, CSS, JS, JSON) is tested individually because some servers configure Brotli for HTML but forget to extend it to other text MIME types.

Common Mistakes to Avoid

  • Brotli enabled for HTML but not for CSS or JS at the same origin
  • Static Brotli quality 4 (fast) used when quality 11 (slow encode but cached) is fine for static assets
  • On-the-fly Brotli at quality 11 burning CPU on every request
  • Origin compresses with gzip, CDN re-compresses with Brotli (works but wastes CPU)
  • Forgetting Vary: Accept-Encoding so old gzip responses get served to Brotli clients

Quick Checklist

  • HTML returns Content-Encoding: br
  • CSS, JS, JSON also returned with Brotli
  • Static assets pre-compressed at quality 11
  • Dynamic HTML compressed at quality 4
  • Vary: Accept-Encoding present

Frequently Asked Questions