🗜️ Brotli Compressor
Brotli compress and decompress text online — up to 26% smaller than gzip, served by CDNs with quality 0–11 control and Base64 output
About this tool
Brotli is a modern compression algorithm developed by Google that achieves 20–26% better compression ratios than gzip at similar speeds. It powers Content-Encoding: br on most CDNs and web servers today — when you load a page over HTTPS, the HTML, CSS, and JS are almost certainly Brotli-compressed.
This tool compresses any text into Brotli and shows the Base64 representation, or reverses it — decompress Base64-encoded Brotli data back to readable text. The quality slider lets you trade speed for tighter compression (0 = fastest, 11 = smallest output).
Example: compressing 5,200 characters of repeated Latin text at quality 6 yields roughly 80 bytes — a 98.5% reduction. At quality 11 the same input shrinks to about 60 bytes. Compare with gzip on the same data to see Brotli's advantage on repetitive content.
FAQ
Why use Brotli instead of gzip? ›
Brotli typically produces 15–25% smaller output than gzip at comparable compression speeds, especially on text-heavy content like HTML, CSS, and JavaScript. Every major browser supports Brotli decompression, and most CDNs serve Brotli by default. Use this tool to see the size difference on your own data.
What does the Quality slider do? ›
Quality 0–11 controls the compression level: lower values are faster but produce larger output; higher values take more time but yield smaller results. Quality 4–6 is the sweet spot for most use cases. Quality 11 (maximum) can be significantly slower but produces the tightest output — useful for static assets compressed once and served many times.
My compressed output is larger than the input — why? ›
Brotli has per-stream overhead (~10–20 bytes for the header), so very short or already-compressed input (random data, Base64, encrypted text, JPEGs) can come out larger than the original. Compression works best on human-readable, repetitive text such as JSON, HTML, CSS, or log files.
Does Brotli decompression work in all browsers? ›
Decompression is supported in Chrome, Edge, Firefox, Safari, and Opera — all modern browsers since 2020. Compression via CompressionStream (the API this tool uses) may have slightly narrower support: Chrome/Edge 80+, Firefox 113+, Safari 16.4+. If compression fails, try decompression-only mode or switch to a supported browser.