Skip to tool

Brotli Compress and Decompress

Compress or decompress Brotli (.br) files up to 2 GiB, with a quality from 0 to 11.

Runs in your browser — your input is processed on this device and never uploaded.

Input

Pasted text up to 100 MiB, read as UTF-8, or a file or folder up to 2 GiB. A folder is packed as a .tar first.

Brotli has no header to detect, so Auto decompresses a file named .br and compresses anything else. Compress and Decompress force a direction.

Result

Results appear here.

About this tool

On this page

What is Brotli?

Brotli is a compression format. A .br download and a lot of web traffic use it. The compressed bytes are not gzip, zlib or raw DEFLATE, so those tools cannot open a Brotli stream.

This tool compresses bytes into a Brotli stream, or decompresses a Brotli stream back to the original bytes.

Brotli options

Input
Pasted text up to 100 MiB, read as UTF-8, or a file up to 2 GiB. A file is read in pieces and is not held whole.
Action
Auto (the default), Compress or Decompress. Brotli has no header to detect, so Auto decompresses a file named .br and compresses anything else. Decompress reads Brotli only. It does not guess other formats.
Quality
A whole number from 0 to 11. 0 is the fastest and usually the largest, and 11 spends much more time for a smaller result. The default is 6, and the quality is ignored when you decompress.
Filename
Optional. Compress adds .br. Decompress removes one trailing .br. Left blank, an upload keeps its own name and pasted text downloads as output.br or output.bin.
  • Compression writes a 4 MiB window, which every decoder opens. Decompression opens the standard windows up to 16 MiB, which is what the brotli command writes when you do not pass a window flag. A stream that uses the large-window extension is rejected.
  • The result is a file download. Expanding pasted text stops at 200 MiB and expanding a file at 4 GiB.

Why Brotli quality defaults to 6

Quality 11 is what the brotli command uses when you do not pass a flag, and on a multi-megabyte input it can run for a long time. Quality 6 is the same default this site uses for gzip, and it is the useful middle of the range: clearly smaller than quality 0, and much faster than 11.

A pasted run stops after 5 minutes. On a fast desktop, quality 11 takes well over a second per MiB, so a large paste is more comfortable at quality 9 or lower. Quality 10 takes about half as long. A file streams, and the clock restarts as output arrives.

Brotli alternatives

Gzip is the format behind .gz files. zlib and raw DEFLATE are the same DEFLATE data with a different wrapper, or with no wrapper. Zstandard (.zst) is another modern codec. This page will not open any of those.

The brotli command on your computer does the same job for files larger than 2 GiB, and it can use the large-window extension when you ask it to.

Things to know about Brotli

Jyrki Alakuijala, Zoltan Szabadka and Evgenii Kliuchnikov published Brotli at Google. The format is RFC 7932.

There is no standard way to tell a Brotli stream from other bytes by sniffing, so this tool trusts the action you pick.

Warning

The stream does not carry a checksum of the original bytes the way a gzip file does. A damaged or truncated stream fails to decode, but that check does not tell you who created the file, and it is not a signature.

Browse

Find similar tools by category or tag.