Free auditStart free
GlossaryGlossary · Performance

Brotli compression

Brotli is a lossless compression format for web text, sent as Content-Encoding: br. See web.dev's gzip comparison, compression levels and how to check your server.

3 min
read
5
sources
Oct 21, 2026
updated
Scaplet Editorial Team
author
In one line

Brotli is a lossless compressed data format, defined in RFC 7932, that web servers can use to shrink text assets before sending them. Browsers ask for it with Accept-Encoding and servers answer with Content-Encoding: br. Web.dev lists it with gzip as a commonly used algorithm that performs best on text such as HTML, CSS and JavaScript.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Explained

What Brotli is

RFC 7932 defines Brotli as "a lossless compressed data format that compresses data using a combination of the LZ77 algorithm and Huffman coding, with efficiency comparable to the best currently available general-purpose compression methods." The RFC is informational, from the IETF, and its authors are at Google.

On the web it is one of the HTTP content encodings. MDN lists br as "A format using the Brotli algorithm structure (defined in RFC 7932)" alongside gzip, deflate and zstd. It is the same job as gzip compression: make text responses smaller so pages load sooner.

02Check it

How the browser and server agree on it

The browser lists the encodings it accepts in the Accept-Encoding request header. The server picks one and names it in the Content-Encoding response header. MDN's example of a browser's preference:

Web.dev says all modern browsers support gzip and Brotli and advertise both. Google's crawlers support them too: Google lists gzip, deflate and Brotli (br) as supported content encodings, and the crawler's own Accept-Encoding header advertises them, for example Accept-Encoding: gzip, deflate, br.

Request and response headers
Accept-Encoding: br;q=1.0, gzip;q=0.8, *;q=0.1

Content-Encoding: br
03web.dev examples, uncompressed vs compressed size

Brotli vs gzip: the numbers

Web.dev's text compression guide shows both algorithms on the same files:
File

angular-1.8.3.js

Uncompressed
1,346 KiB
gzip
329 KiB (76%)
Brotli
256 KiB (81%)
File

angular-1.8.3.min.js

Uncompressed
173 KiB
gzip
60 KiB (65%)
Brotli
53 KiB (69%)

Percentages are the compression ratios web.dev reports. Brotli is smaller on both files, and the gap is larger on the unminified one. Web.dev adds that both algorithms often reach compression rates as high as 70-90% for larger text files.

05Check it

Check it in 2 minutes

Ask for Brotli and read which encoding comes back:

If you see content-encoding: br, Brotli is on for that response. If it prints gzip or nothing, the server chose another encoding or isn't compressing that resource. Test a CSS or JavaScript file as well, because servers often configure compression per file type. Web.dev notes it is the hosting provider's responsibility to configure the server to serve the compressed resource when the client requests it.

Request a page with Brotli accepted
curl -sI -H "Accept-Encoding: br" https://example.com/ | grep -i content-encoding
Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What is Brotli encoding?

It is the br HTTP content encoding: a lossless compression format defined in RFC 7932 that servers can use to send smaller HTML, CSS and JavaScript responses.

02Is Brotli better than gzip?

In web.dev's examples it produced smaller files than gzip on both a raw and a minified JavaScript file. Compression level and whether you compress statically or dynamically also matter.

03Does Google support Brotli?

Yes. Google's crawler documentation lists gzip, deflate and Brotli (br) as supported content encodings.

04Should I use the highest Brotli level?

For files compressed ahead of time, yes, the extra time is paid once. For responses compressed on request, web.dev advises mid-range settings as the better trade-off between ratio and speed.

Sources · 5

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • mozilla.org
  • web.dev
  • google.com
  1. 01RFC 7932: Brotli Compressed Data Formatrfc-editor.org · checked 2026-10-25
  2. 02MDN: Accept-Encoding headerdeveloper.mozilla.org · checked 2026-10-25
  3. 03MDN: Content-Encoding headerdeveloper.mozilla.org · checked 2026-10-25
  4. 04web.dev: Optimize the encoding and transfer size of text-based assetsweb.dev · checked 2026-10-25
  5. 05Google crawling infrastructure: Overview of Google crawlers and fetchersdevelopers.google.com · checked 2026-10-25
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly