OpenReplay Logo
12k
12k

Compression comparison

Compress any file with gzip, Brotli and Zstandard right in your browser, then compare their size, compression ratio and speed side by side, and download whichever wins.

Pick any file to compare gzip, Brotli and Zstandard compression.

About this tool

This tool runs three compressors on the same file (gzip (DEFLATE), Brotli and Zstandard) entirely in your browser via a Web Worker, and lays the results out in one table: the compressed size, the percentage saved versus the original, and how long each one took. The smallest output is highlighted as the winner, and every result is round-trip verified (decompressed and checked byte-for-byte) so you know the data is intact.

Use it to decide which Content-Encoding to serve, to see how much a JSON, log, CSV or WebAssembly payload shrinks before you wire up server-side compression, or simply to settle the gzip-vs-Brotli-vs-Zstd question for your own data. Each algorithm has a level slider (gzip 0–9, Brotli 1–11, Zstandard 1–19) because the right pick is a trade-off between size and speed: Brotli at quality 11 usually wins on size but is the slowest, while Zstandard and gzip are far faster at comparable ratios. You can also compare the browser's built-in CompressionStream where it is available.

Your file never leaves your device: all three compressors run locally in a Web Worker, and the only thing fetched over the network is the tool's own WebAssembly code. Nothing is uploaded to OpenReplay.

Frequently asked questions

Which is better: gzip, Brotli or Zstandard?

It depends on your data and your priority. Brotli at high quality usually produces the smallest files, which is ideal for static text assets you compress once and serve many times. Zstandard gets close to Brotli on size but is much faster, so it suits content compressed on the fly. gzip is the most universally supported and the quickest to decode. This tool shows the exact trade-off for your specific file.

What is the difference between gzip and Brotli?

Both shrink text well, but Brotli uses a larger window and a built-in dictionary, so it typically compresses 15–25% smaller than gzip for web assets, at the cost of slower compression at its highest quality. gzip (DEFLATE) is older, faster and supported everywhere, while Brotli is accepted by modern browsers as the "br" Content-Encoding.

Is Zstandard better than gzip?

For most files Zstandard (zstd) compresses smaller than gzip and is dramatically faster at both compression and decompression, which is why it is increasingly used for HTTP responses and storage. gzip still wins on universal compatibility. Run your file through both here to see the size and speed difference directly.

What compression level should I choose?

Higher levels compress smaller but take longer, with diminishing returns. gzip 6 is the common server default and gzip 9 squeezes a little more; Brotli 11 gives the best ratio but is slow; Zstandard 19 is a strong high setting. Drag each slider and re-compress to find the sweet spot: the time column shows what each level costs.

Does this tool upload my file?

No. Compression happens entirely in your browser inside a Web Worker; the file is never sent to a server. The only network request is for the tool's own WebAssembly modules (the Brotli and Zstandard codecs), which are static assets, so your data stays on your device.