Format Atlas

Compare

Brotli vs gzip

Brotli and gzip are lossless formats used for HTTP delivery. Brotli is common for web-content compression, while gzip has broad compatibility with existing tools.

Which format should you choose?

Try Brotli for web text when the server and client negotiate br. Consider gzip for older tools or established delivery paths. Check Accept-Encoding, Content-Encoding, cache variation, and measured size and speed.

Good fit for Brotli

Storing losslessly compressed streams · Compressing content for compatible HTTP delivery

  • Precompressed web text when the server and client support Brotli
  • Exchanging compressed data between Brotli-capable tools

Good fit for GZIP

Compress a file or tar archive without data loss

  • Unix distributions, logs, and text files

Basic information

FieldBrotliGZIP
Extension.br.gz, .gzip
MIME typeapplication/octet-streamapplication/gzip
Common usesStoring losslessly compressed streams · Compressing content for compatible HTTP deliveryCompress a file or tar archive without data loss
How to openUse a Brotli-capable decompression tool or library. For precompressed web delivery, send Content-Encoding: br to compatible requests and check file naming, media type, and cache configuration.Decompress with a GZIP-compatible tool. For tar.gz, also extract the tar archive.
Export or convertTo convert to gzip or zstd, decompress and recompress. Verify the output with a checksum or content comparison, and measure size, encoding time, and receiver support. Do not infer HTTP headers or content only from the .br extension.When converting to ZIP or another archive, check file names, directory structure, and extracted contents.

Choose by use case

Precompressed web text when the server and client support Brotli

Storing losslessly compressed streams · Compressing content for compatible HTTP delivery

Brotli

Exchanging compressed data between Brotli-capable tools

Storing losslessly compressed streams · Compressing content for compatible HTTP delivery

Brotli

Unix distributions, logs, and text files

Compress a file or tar archive without data loss

GZIP

Key point 1

Brotli is specified by RFC 7932; gzip by RFC 1952. HTTP negotiates them as separate content codings.

More on the differences

Key point 2

Neither compressed stream is a multi-file archive. A .br or .gz extension alone does not prove which HTTP headers or coding are in use.

More on the differences

More on the differences

Choose based on clients, server setup, and measured workloads. Test representative content and make sure caches distinguish responses encoded with different content codings.

  • Both are lossless but have different stream formats and require matching decoders.
  • Brotli may be used for HTTP Content-Encoding: br and precompressed .br files. Gzip remains widely handled by existing tools and systems.
  • Size and speed depend on content, settings, and implementation; neither wins for every file. Recompression requires decoding and encoding again.

Frequently asked questions

Is Brotli always smaller than gzip?

No. Results vary by content and compression settings. Measure the pages or files you actually serve.

Learn more

References and specifications