Pick an input
Choose one of ten sample datasets — prose, runs, random text, JSON, DNA, logs, raw binary, digits, letters or pre-compressed bytes — at 256 B, 1 KB, 4 KB or 16 KB. Or switch to Custom text and paste anything.
Free tools · Data
RLE, Huffman, LZW, LZ78, LZ77, a gzip-style pipeline and real zlib, raw DEFLATE, gzip and Brotli raced over ten data types, four lengths, or your own text — computed on your device, never uploaded.
Eleven algorithms, one input
Pick a sample dataset and length, or paste your own text. Every byte compresses on your device — nothing is stored or uploaded, and custom input wipes after ten idle minutes.
Sizes are honest totals: Huffman includes its 257-byte code table, LZW its 2-byte codes, LZ78 its index/byte pairs, LZ77 its flag bytes — and the pipeline pays both stages. Real codecs add their container overhead (zlib headers, gzip CRC-32). That overhead is why rankings flip with length.
Rows marked “larger than input” met incompressible data — every honest compressor expands randomness. That is the lesson, not a bug.
Six textbook byte-level implementations for teaching, plus Stored and real zlib, raw DEFLATE, gzip and Brotli via your browser — interoperable bytes you can decompress anywhere.
How it works
The same redundancy trade-offs behind gzip and Brotli, made visible one input at a time.
Choose one of ten sample datasets — prose, runs, random text, JSON, DNA, logs, raw binary, digits, letters or pre-compressed bytes — at 256 B, 1 KB, 4 KB or 16 KB. Or switch to Custom text and paste anything.
Six classic compressors plus Stored and real zlib, raw DEFLATE, gzip and Brotli run over the same bytes: compressed size, ratio and savings per algorithm, with the smallest crowned. Bars make the ranking instant.
Change the data type or the length and watch the winner change — that crossover is the whole lesson. Copy the summary for notes or tickets.
Questions
If you manage servers by hand, see the engineering services behind this tools series.
No. All eleven compressors run entirely in your browser — the page makes no network requests, stores nothing, and wipes custom input after ten idle minutes (sooner if you press Clear). You can verify this in your browser's developer tools or disconnect from the network after the page loads.
Eleven lossless byte codecs: Run-Length Encoding (run pairs), Huffman coding (shorter codes for frequent bytes, with a 257-byte code table), LZW and LZ78 (two flavors of learned-dictionary coding), LZ77 (offset/length pointers into a 4 KB sliding window), an LZ77+Huffman two-pass staging of the gzip idea, plus Stored (uncompressed baseline) and real zlib, raw DEFLATE, gzip and Brotli via your browser's CompressionStream. Each is a real round-tripping implementation, not a simulation.
Every technique bets on a different kind of redundancy and pays a different header cost. RLE crushes long runs but doubles random data; Huffman's code table is worth it only once the input outgrows 257 bytes; LZW and LZ77 need enough length to learn phrases and find matches. Random data expands under all four — an honest compressor cannot shrink entropy.
Yes. Huffman includes its 257-byte code table, LZW its 2-byte-per-code stream, LZ77 its flag bytes and RLE its count bytes. Hiding headers would flatter small inputs; counting them is exactly why the rankings flip with length.
The six textbook rows isolate each idea byte-aligned so you can see what it contributes. The Stored, zlib, raw DEFLATE, gzip and Brotli rows are the real interoperable codecs beside them — use the textbook rows to build intuition, then reach for the real rows to ship bytes.
Any text up to 100,000 UTF-8 bytes — prose, JSON, CSV, code, log excerpts. That cap keeps encoding instant on the page. Sensitive text is safe to compare: it never leaves your device and clears after ten idle minutes.