---
title: "Brotli vs Gzip Compression: Real CDN Performance Compared"
description: Brotli vs gzip compared on compression ratio, CPU cost and browser support, with recommended levels for static and dynamic content on a CDN.
image: https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-17-2026-07-00-35-8728-AM.jpeg
---

[![BlazingCDN](https://blog.blazingcdn.com/hubfs/Logo/blog-logo-w.png)](https://blog.blazingcdn.com?hsLang=en-us)

[📘Learn ▾](https://blog.blazingcdn.com/cdn-learn?hsLang=en-us)

[CDN Fundamentals](https://blog.blazingcdn.com/cdn-fundamentals?hsLang=en-us) [By Content Type](https://blog.blazingcdn.com/by-content-type?hsLang=en-us) [Advanced Concepts](https://blog.blazingcdn.com/advanced-concepts?hsLang=en-us) [Glossary](https://blog.blazingcdn.com/glossary?hsLang=en-us)

[⚡ Web Performance](https://blog.blazingcdn.com/web-performance?hsLang=en-us)

[🎬Video & Streaming ▾](https://blog.blazingcdn.com/video-streaming-cdn?hsLang=en-us)

[🔴 Live Streaming](https://blog.blazingcdn.com/live-streaming?hsLang=en-us) [📺 VOD & OTT](https://blog.blazingcdn.com/vod-ott?hsLang=en-us) [💰 Bandwidth & Costs](https://blog.blazingcdn.com/bandwidth-costs?hsLang=en-us)

[🏭 Other Industries ▾](https://blog.blazingcdn.com/cdn-industry-insights?hsLang=en-us)

[📺 Media & Broadcasting](https://blog.blazingcdn.com/media-broadcasting?hsLang=en-us) [💾 Software & SaaS](https://blog.blazingcdn.com/software-saas?hsLang=en-us) [🏗️ DevOps & Cloud Infra](https://blog.blazingcdn.com/devops-cloud-infra?hsLang=en-us) [📚 AdTech & Advertising](https://blog.blazingcdn.com/adtech-advertising?hsLang=en-us) [🎮 Gaming & Esports](https://blog.blazingcdn.com/gaming-esports?hsLang=en-us) [📱 Mobile Apps & Developers](https://blog.blazingcdn.com/mobile-apps-developers?hsLang=en-us) [🤖 AI & Machine Learning](https://blog.blazingcdn.com/ai-machine-learning?hsLang=en-us) [🏛️ Enterprise & Corporate](https://blog.blazingcdn.com/enterprise-corporate?hsLang=en-us) [📚 E-Learning & EdTech](https://blog.blazingcdn.com/e-learning-edtech?hsLang=en-us) [🏟️ Sports & Live Events](https://blog.blazingcdn.com/sports-live-events?hsLang=en-us)

[💰 Pricing & Costs ▾](https://blog.blazingcdn.com/cdn-pricing-and-cdn-costs?hsLang=en-us)

[Provider Pricing](https://blog.blazingcdn.com/provider-pricing?hsLang=en-us) [Cost Optimization](https://blog.blazingcdn.com/cost-optimization?hsLang=en-us) [Decision Support](https://blog.blazingcdn.com/decision-support?hsLang=en-us)

[⚡Compare ▾](https://blog.blazingcdn.com/cdn-comparison?hsLang=en-us)

[Provider Comparisons](https://blog.blazingcdn.com/provider-comparisons?hsLang=en-us) [Strategy Comparisons](https://blog.blazingcdn.com/strategy-comparisons?hsLang=en-us) [Ratings & Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us)

[📊 Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us)

[🔒 Security ▾](https://blog.blazingcdn.com/cdn-security?hsLang=en-us)

[Attack Protection](https://blog.blazingcdn.com/attack-protection?hsLang=en-us) [Encryption & Access](https://blog.blazingcdn.com/encryption-access?hsLang=en-us) [Video & DRM Security](https://blog.blazingcdn.com/video-drm-security?hsLang=en-us)

[📁 Case Studies](https://blog.blazingcdn.com/case-studies?hsLang=en-us) [🔌 Integrations](https://blog.blazingcdn.com/integrations?hsLang=en-us) [🛠️ Tools](https://blog.blazingcdn.com/cdn-tools?hsLang=en-us)

[Get Started](https://blazingcdn.com/sign-up-contact-form/)

[Compare](https://blog.blazingcdn.com/en-us/tag/compare) [Compare - Ratings & Benchmarks](https://blog.blazingcdn.com/en-us/tag/compare-ratings-benchmarks)

# Brotli vs Gzip Compression: Real CDN Performance Compared

 Vadym Borovskyi  Oct 17, 2026, 9:03:09 AM

![](https://blog.blazingcdn.com/hubfs/Gemini-Blog/image-Oct-17-2026-07-00-35-8728-AM.jpeg)

The brotli vs gzip choice depends on where compression runs. Pre-compressed at quality 11, Brotli typically makes minified HTML, CSS and JS files 15–25% smaller than gzip at level 9. Compressed on the fly, Brotli at levels 4–5 beats gzip at level 6 by roughly 5–10% at a similar CPU cost. These ranges come from public benchmarks published between Brotli's 2015 release and 2025, and as of 2026 every current major browser accepts Brotli over HTTPS.

This article covers four things: a ratio and speed table for each compression level, a worked CPU and bandwidth model, recommended levels for static and dynamic content, and a decision matrix by workload. It also covers the failure modes that cause most broken HTTP compression rollouts at CDN scale.

## **Gzip vs Brotli: what actually differs in the algorithms**

Gzip and Brotli both use LZ77 matching followed by entropy coding, but they differ in three ways.

Gzip wraps DEFLATE, which has these properties:

- It dates from 1992, and its formats were specified in RFC 1951 and RFC 1952.
- It uses a 32 KB sliding window and Huffman coding.
- It has nine compression levels.

Brotli, published by Google in 2015 and specified in RFC 7932, makes three changes:

- **Larger window.** The window grows up to 16 MB, so repeated code far apart in a large bundle can still be matched.
- **Better entropy coding.** Context modeling and second-order coding squeeze more out of each match.
- **Built-in dictionary.** A static dictionary of roughly 120 KB holds common words and HTML, CSS and JS fragments. This is why Brotli wins most clearly on small text files, where gzip has no history to match against.

Brotli has twelve quality levels, from 0 to 11. The top two levels switch to a far more exhaustive match search, which explains the cliff in the speed column below.

Decompression is not the deciding factor. Both formats typically decode at several hundred MB/s per core on current client hardware, so the client-side cost of choosing Brotli is negligible. Every trade-off sits on the compressing side.

## **Brotli vs gzip benchmarks: ratio and speed per level**

| Encoder and level | Output size, % of original (minified text, typical range) | Compression speed per core (approximate) | Typical use |
| --- | --- | --- | --- |
| gzip 1 | 32–38% | 60–150 MB/s | CPU-starved proxies |
| gzip 6 | 27–32% | 20–60 MB/s | Default dynamic fallback |
| gzip 9 (or Zopfli) | 26–31% (Zopfli about 3–8% smaller again) | 10–30 MB/s (Zopfli well under 1 MB/s) | Static gzip fallback files |
| Brotli 1 | 30–36% | 80–250 MB/s | High-throughput APIs |
| Brotli 4–5 | 25–30% | 25–100 MB/s | Dynamic HTML and JSON |
| Brotli 9 | 23–28% | 5–20 MB/s | Cached responses with long TTLs |
| Brotli 11 | 21–26% | 0.5–2 MB/s | Build-time pre-compression only |

Brotli 4–5 matches or beats gzip 6 at comparable CPU, while Brotli 11 buys roughly another 10–15% at 20 to 100 times the CPU cost, so it belongs in the build pipeline, never in the request path.

### Methodology note

These figures are typical ranges compiled from public benchmark corpora of minified web assets compressed on modern x86 server cores. They are not measurements by this blog. Ratios vary with content: already-minified, low-repetition JS sits at the top of each range, and verbose HTML or JSON sits at the bottom.

Two dimensions the old version of this article skipped are worth weighing alongside size:

- **Decompression speed** is roughly equal between the two formats.
- **Time to first byte on dynamic responses** is where high levels hurt. Compressing a 150 KB document at 1 MB/s adds about 150 ms before the stream completes.

## **Why HTTP compression still matters at CDN scale**

HTTP compression reduces bytes on the critical rendering path, and that is where Core Web Vitals such as Largest Contentful Paint are won or lost. The egress reduction is real but secondary for most sites. Here is a worked model with every assumption stated (all figures are this blog's arithmetic, not measurements).

### The bandwidth model

- Assume a page ships 400 KB of uncompressed HTML, CSS and JS.
- With gzip 6 at 30%, that is 120 KB on the wire. With pre-compressed Brotli 11 at 24%, it is 96 KB.
- The 24 KB difference equals 192 kilobits. On a 5 Mb/s mobile link, that is about 38 ms of transfer removed from the render path, on every uncached navigation.
- At 10 million page views a month, the same assets total 4 TB raw. That is 1.2 TB with gzip versus 0.96 TB with Brotli, a 20% cut in text egress.

### The CPU model

- Assume 1,000 dynamic HTML responses per second at 150 KB each, or 150 MB/s of input.
- Gzip 6 at about 35 MB/s per core needs roughly 4–5 cores.
- Brotli 5 at about 40 MB/s needs about 4 cores.
- Brotli 11 at about 1 MB/s would need roughly 150 cores and add 150 ms per response.

Switching from gzip 6 to Brotli 5 is therefore close to CPU-neutral, while going to Brotli 11 on the fly is a 30x hardware decision that nobody should make by accident.

## **Static pre-compression vs on-the-fly compression**

Static pre-compression means encoding each asset once at build or deploy time and storing sibling files, such as app.js.br and app.js.gz, next to the original. The server then picks one by Accept-Encoding. The CPU cost is paid once per deploy instead of once per request, which is the only setting where Brotli 11 and Zopfli make economic sense.

In nginx, gzip\_static on serves the .gz sibling. The third-party ngx\_brotli module adds brotli\_static on for .br siblings, plus brotli on and brotli\_comp\_level 5 for responses that have no sibling. Build tools for most front-end stacks can emit both variants as part of the asset pipeline.

On-the-fly compression encodes each response as it streams. It suits HTML rendered per user, API JSON and anything with a short TTL. A CDN can also compress on the fly at the edge and cache the result. A cacheable response is then compressed once per edge cache miss, which makes Brotli 6–9 affordable for long-TTL objects even when the origin sends them uncompressed.

## **Recommended Brotli compression levels for static and dynamic content**

For Brotli compression, use quality 11 for fingerprinted static assets compressed at build time, quality 4–5 for dynamic HTML and JSON compressed per request, and quality 6–9 for cacheable responses compressed once at the edge. Keep gzip at level 6 on the fly, or at level 9 or Zopfli for static fallback files.

- **Minimum size.** Skip responses under about 1 KB. Framing overhead can make them larger, and they fit in one packet either way.
- **Content types.** Compress HTML, CSS, JS, JSON, SVG, XML, WebAssembly and plain-text fonts such as TTF. Never compress JPEG, PNG, WebP, AVIF, MP4, WOFF2, ZIP or other already-compressed formats: you burn CPU and gain nothing.
- **Fallback.** Keep gzip enabled. Clients that do not advertise br, including many HTTP libraries, bots and some embedded devices, still need a compressed response.

## **Best fit by workload: a gzip and Brotli decision matrix**

| Workload | Primary encoding | Where it runs | Fallback |
| --- | --- | --- | --- |
| Fingerprinted JS and CSS bundles | Brotli 11 | Build pipeline | gzip 9 or Zopfli |
| Server-rendered HTML per user | Brotli 4–5 | Origin, streamed | gzip 6 |
| High-QPS JSON APIs | Brotli 1–4 or gzip 4–6 | Origin or API gateway | gzip |
| Cacheable responses with long TTLs | Brotli 6–9 | CDN edge, on cache miss | gzip 6 |
| Video segments, images, installers, archives | None | Not applicable | None |

Choose the encoding by where the CPU is spent: pay for maximum Brotli once at build time, pay for moderate Brotli per request, and never pay to recompress media.

## **What breaks in HTTP compression rollouts**

Most failures come from caching and headers, not from the codecs:

- **Missing Vary: Accept-Encoding.** A shared cache can store the br variant and serve it to a client that only accepts gzip. The symptom is garbled responses for a small client population.
- **Cache fragmentation.** Raw Accept-Encoding strings have many orderings. CDNs should normalize them to a few buckets (br, gzip, identity) in the cache key, or the hit ratio quietly drops.
- **Double compression.** An origin sends gzip and a proxy compresses again. Clients see binary noise, or Content-Length mismatches show up in logs.
- **Broken validators.** A strong ETag reused across encodings causes incorrect 304 responses. Use weak or per-encoding ETags.
- **BREACH.** Compressing HTTPS responses that contain a secret next to attacker-reflected input leaks the secret through response size. Mask CSRF tokens per request, or exclude those responses from compression.

### Verify this on your own stack

- Request a JS bundle with an Accept-Encoding header of br and gzip, then confirm the response returns Content-Encoding br and Vary Accept-Encoding.
- Repeat the request with gzip only, and compare the two transferred sizes in browser developer tools.
- In CDN logs, chart the share of text responses served per encoding, including identity. Any identity share on text types above a few percent points to a misconfiguration.

## **Where Zstandard fits next to Brotli and gzip**

Zstandard (zstd) is now advertised as a content encoding by Chromium-based browsers. At comparable ratios to mid-level Brotli, it compresses noticeably faster, which makes it attractive for dynamic responses. It does not replace Brotli 11 for static assets, and support is not yet universal, so it adds a third variant rather than removing one. A separate Zstandard comparison on the [**web performance hub of this blog**](https://blog.blazingcdn.com/web-performance?hsLang=en-us) covers levels and rollout order.

## **Brotli and gzip delivery with BlazingCDN**

BlazingCDN supports gzip, Brotli and zstd compression at the edge, alongside HTTP/2 and TLS 1.3. Custom cache rules are set up together with an engineer, which is where Accept-Encoding normalization and per-encoding cache keys get configured; the full list is on the [**BlazingCDN compression and delivery features page**](https://blazingcdn.com/features/).

## **FAQ: Brotli vs gzip compression**

### Is Brotli better than gzip for every file type?

No, Brotli only wins on compressible text such as HTML, CSS, JS, JSON and SVG, where it typically produces files 5–25% smaller than gzip depending on level. On JPEG, MP4, WOFF2 or ZIP files neither encoding helps, because the data is already compressed, and attempting it wastes CPU while sometimes slightly increasing the response size.

### Gzip vs Brotli: which uses more CPU to compress?

Brotli at levels 1–5 uses roughly the same CPU as gzip at level 6 while producing smaller output. Brotli at levels 10–11 is a different class: often 20 to 100 times slower, around 1 MB/s per core. Decompression costs are similar for both formats, so the client pays nothing extra for Brotli.

### Which Brotli compression level should I use for dynamic content?

Use Brotli level 4 or 5 for dynamic HTML and JSON compressed per request. That range matches or beats gzip 6 on size at comparable CPU and adds negligible latency. Reserve levels 10–11 for assets compressed once at build time, and use 6–9 for cacheable responses that a CDN compresses once per cache miss.

### Do all browsers support Brotli compression?

Yes, as of 2026 every current major desktop and mobile browser supports Brotli, but browsers advertise br in Accept-Encoding only over HTTPS. Plain-HTTP requests, many command-line clients, older HTTP libraries and some crawlers still request gzip only, which is why a gzip fallback remains necessary on any public endpoint.

### Should I keep gzip enabled after switching to Brotli?

Yes, keep gzip enabled as the fallback encoding. Clients that do not send br in Accept-Encoding would otherwise receive uncompressed text, often three to four times larger. Serve Brotli when advertised, gzip otherwise, and always send Vary: Accept-Encoding so shared caches store and return the correct variant per client.

### Which files should HTTP compression skip on a CDN?

HTTP compression should skip images, video segments, audio, WOFF2 fonts, archives, installers and any response under about 1 KB. These formats are already compressed or too small to benefit. Compressing them adds CPU and latency for zero byte savings, and on large binaries it can also interfere with range requests.

## **Benchmark your own text assets this week**

Pull the 20 largest text responses by total bytes from your CDN logs. Encode each one at gzip 6, Brotli 5 and Brotli 11, and record output size and compression time per core. Then chart the share of text responses currently served as br, gzip and identity. Together, those two numbers tell you how much egress is on the table and whether your headers are already leaking it. Recheck Vary and ETag behavior on the same assets before changing any level.

BlazingCDN's [**CDN performance metrics and public test file**](https://blazingcdn.com/performance-metrics/) list its June 2026 measurements, such as 24 ms and 1.11 Gb/s in North America, so you can compare delivery against your current provider.

Share: [f](https://www.facebook.com/sharer/sharer.php?u=https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip) [in](https://www.linkedin.com/sharing/share-offsite/?url=https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip) [𝕏](https://twitter.com/intent/tweet?url=https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip&text=) [✉](mailto:?subject=%3Cspan%20id="hs_cos_wrapper_name"%20class="hs_cos_wrapper%20hs_cos_wrapper_meta_field%20hs_cos_wrapper_type_text"%20style=""%20data-hs-cos-general-type="meta_field"%20data-hs-cos-type="text"%20%3EBrotli%20vs%20Gzip%20Compression:%20Real%20CDN%20Performance%20Compared%3C/span%3E&body=https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip)

![BlazingCDN](https://blog.blazingcdn.com/hs-fs/hubfs/Logo/blog-logo-w.png?height=24&name=blog-logo-w.png)

*Heavy traffic.*  
Light bill.

The CDN for video and large traffic

Their monthly bill vs ours

- 20 TBFastly $2,087**$92.50**
- 50 TBCDN77 $990**$215**
- 200 TBCloudFront $11,965**$765**

Published list prices, Aug 2026

[Calculate your cost](https://blazingcdn.com/cdn-cost-calculator/?utm_source=blog&utm_medium=sidebar&utm_campaign=blog_sidebar&utm_content=compare_calc)

## Related posts

[![](https://cdn.leonardo.ai/users/50b20153-23ad-4a4e-9850-7b347a32af23/generations/592246a4-bd4c-4243-9b8f-e10d6af2827f/Default_What_is_the_best_CDN_for_WordPress_0.jpg)](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-wordpress?hsLang=en-us)

Learn - CDN Fundamentals

### [What is the best CDN for WordPress?](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-wordpress?hsLang=en-us)

Imagine this: your latest blog post goes viral overnight, and your WordPress site crashes under the traffic surge. It’s ...

Oct 16, 2026, 11:50:23 AM [Read more](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-wordpress?hsLang=en-us)

[![](https://cdn.leonardo.ai/users/50b20153-23ad-4a4e-9850-7b347a32af23/generations/b3d6d7b8-8f20-4d2c-9fe5-357e185ea152/Default_What_is_the_best_CDN_for_users_from_China_0.jpg)](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-users-from-china?hsLang=en-us)

Learn

### [What is the best CDN for users from China?](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-users-from-china?hsLang=en-us)

Imagine a bustling metropolis teeming with online activity, a city where digital content flows seamlessly across ...

Oct 16, 2026, 11:40:23 AM [Read more](https://blog.blazingcdn.com/en-us/what-is-the-best-cdn-for-users-from-china?hsLang=en-us)

[![BlazingCDN](https://blog.blazingcdn.com/hubfs/Logo/blog-logo-w.png)](https://blog.blazingcdn.com?hsLang=en-us)

[📘 Learn](https://blog.blazingcdn.com/cdn-learn?hsLang=en-us) [📊 Benchmarks](https://blog.blazingcdn.com/cdn-ratings-and-benchmarks?hsLang=en-us) [🎬 Video & Streaming](https://blog.blazingcdn.com/video-streaming-cdn?hsLang=en-us) [🏭 Industries](https://blog.blazingcdn.com/cdn-industry-insights?hsLang=en-us) [💰 Pricing & Costs](https://blog.blazingcdn.com/cdn-pricing-and-cdn-costs?hsLang=en-us) [⚡ Compare](https://blog.blazingcdn.com/cdn-comparison?hsLang=en-us) [🔒 Security](https://blog.blazingcdn.com/cdn-security?hsLang=en-us) [🛠️ Tools](https://blog.blazingcdn.com/cdn-tools?hsLang=en-us) [✍️ Publish with us](https://blog.blazingcdn.com/publish-with-us?hsLang=en-us)

in f 𝕏 ✉

 Copyright © BlazingCDN |. All rights reserved.

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blazingcdn.com/#organization",
  "@type" : "Organization",
  "description" : "High-volume CDN for video, live streaming, OTT/IPTV, software, games, SaaS and large-file delivery.",
  "logo" : {
    "@id" : "https://blazingcdn.com/#logo",
    "@type" : "ImageObject",
    "height" : 560,
    "url" : "https://blazingcdn.com/wp-content/uploads/2024/08/logo-560-560.png",
    "width" : 560
  },
  "name" : "BlazingCDN",
  "sameAs" : [ "https://www.linkedin.com/company/blazingcdn", "https://x.com/BlazingCdn", "https://www.reddit.com/r/BlazingCDN/", "https://www.wikidata.org/wiki/Q141711074" ],
  "url" : "https://blazingcdn.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/#website",
  "@type" : "WebSite",
  "inLanguage" : "en-US",
  "name" : "BlazingCDN Blog",
  "publisher" : {
    "@id" : "https://blazingcdn.com/#organization"
  },
  "url" : "https://blog.blazingcdn.com/"
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip#article",
  "@type" : "BlogPosting",
  "author" : {
    "@id" : "https://blog.blazingcdn.com/en-us/author/blazingcdn#person",
    "@type" : "Person",
    "description" : "Vadym Borovskyi is Chief Product and Marketing Officer at BlazingCDN, where he has led product strategy and growth since 2021. He has more than 11 years of experience in IT product management and B2B marketing. On this blog he writes about CDN pricing and egress costs, video and software delivery, cache configuration, and how teams evaluate and switch CDN providers. He is based in Warsaw, Poland.",
    "image" : "https://143144902.fs1.hubspotusercontent-eu1.net/hubfs/143144902/vadym-borovskyi.jpg",
    "jobTitle" : "Chief Product and Marketing Officer",
    "knowsAbout" : [ "Content Delivery Networks (CDN)", "CDN pricing", "Video streaming delivery", "Software and game distribution", "Cache optimization", "Product Management", "B2B Marketing", "Digital Marketing", "Pay Per Click Marketing (PPC)", "Google Ads", "Search Engine Marketing (SEM)", "Marketing Strategy", "Artificial Intelligence (AI)", "Cloud Management", "SaaS Development", "IT Consulting", "Computer Networking", "Project Management", "Startups" ],
    "name" : "Vadym Borovskyi",
    "sameAs" : [ "https://www.linkedin.com/in/axelt/" ],
    "url" : "https://blog.blazingcdn.com/en-us/author/blazingcdn",
    "worksFor" : {
      "@id" : "https://blazingcdn.com/#organization"
    }
  },
  "dateModified" : "2026-10-17T07:03:10Z",
  "datePublished" : "2026-10-17T07:03:09Z",
  "description" : "Brotli vs gzip compared on compression ratio, CPU cost and browser support, with recommended levels for static and dynamic content on a CDN.",
  "headline" : "Brotli vs Gzip Compression: Real CDN Performance Compared",
  "image" : "https://143144902.fs1.hubspotusercontent-eu1.net/hubfs/143144902/Gemini-Blog/image-Oct-17-2026-07-00-35-8728-AM.jpeg",
  "inLanguage" : "en-us",
  "isPartOf" : {
    "@id" : "https://blog.blazingcdn.com/#website"
  },
  "mainEntityOfPage" : {
    "@id" : "https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@id" : "https://blazingcdn.com/#organization"
  },
  "wordCount" : 2189
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip#breadcrumb",
  "@type" : "BreadcrumbList",
  "itemListElement" : [ {
    "@type" : "ListItem",
    "item" : "https://blog.blazingcdn.com/en-us",
    "name" : "Blog",
    "position" : 1
  }, {
    "@type" : "ListItem",
    "item" : "https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip",
    "name" : "Brotli vs Gzip Compression: Real CDN Performance Compared",
    "position" : 2
  } ]
}
```

```json
{
  "@context" : "https://schema.org",
  "@id" : "https://blog.blazingcdn.com/en-us/cdn-compression-performance-brotli-vs-gzip#faq",
  "@type" : "FAQPage",
  "mainEntity" : [ {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "No, Brotli only wins on compressible text such as HTML, CSS, JS, JSON and SVG, where it typically produces files 5–25% smaller than gzip depending on level. On JPEG, MP4, WOFF2 or ZIP files neither encoding helps, because the data is already compressed, and attempting it wastes CPU while sometimes slightly increasing the response size."
    },
    "name" : "Is Brotli better than gzip for every file type?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Brotli at levels 1–5 uses roughly the same CPU as gzip at level 6 while producing smaller output. Brotli at levels 10–11 is a different class: often 20 to 100 times slower, around 1 MB/s per core. Decompression costs are similar for both formats, so the client pays nothing extra for Brotli."
    },
    "name" : "Gzip vs Brotli: which uses more CPU to compress?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Use Brotli level 4 or 5 for dynamic HTML and JSON compressed per request. That range matches or beats gzip 6 on size at comparable CPU and adds negligible latency. Reserve levels 10–11 for assets compressed once at build time, and use 6–9 for cacheable responses that a CDN compresses once per cache miss."
    },
    "name" : "Which Brotli compression level should I use for dynamic content?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Yes, as of 2026 every current major desktop and mobile browser supports Brotli, but browsers advertise br in Accept-Encoding only over HTTPS. Plain-HTTP requests, many command-line clients, older HTTP libraries and some crawlers still request gzip only, which is why a gzip fallback remains necessary on any public endpoint."
    },
    "name" : "Do all browsers support Brotli compression?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "Yes, keep gzip enabled as the fallback encoding. Clients that do not send br in Accept-Encoding would otherwise receive uncompressed text, often three to four times larger. Serve Brotli when advertised, gzip otherwise, and always send Vary: Accept-Encoding so shared caches store and return the correct variant per client."
    },
    "name" : "Should I keep gzip enabled after switching to Brotli?"
  }, {
    "@type" : "Question",
    "acceptedAnswer" : {
      "@type" : "Answer",
      "text" : "HTTP compression should skip images, video segments, audio, WOFF2 fonts, archives, installers and any response under about 1 KB. These formats are already compressed or too small to benefit. Compressing them adds CPU and latency for zero byte savings, and on large binaries it can also interfere with range requests."
    },
    "name" : "Which files should HTTP compression skip on a CDN?"
  } ]
}
```