Gzip, Zlib & Deflate Compressor

Compress or decompress text with gzip, zlib or raw DEFLATE, with base64 output and a live size ratio — 100% in your browser, no upload

Compressed (base64)
H4sIAAAAAAAAA93L2xXCMAwE0Va2AE6K4dCAYxYiIlvGUl5UT+rI98x9TMR3kTxj7LZVvGzHZynNYSs74syafgee9h5w+fnOxpCQlQjugWyldbrTsVH1BrdTiMNTaUr41KXOjmohmWnUY/gDtHwSBlEBAAA=

Original: 337 B → Compressed: 116 B (66% smaller)

🔒 Compressed and decompressed entirely in your browser — nothing is uploaded.

Compress and decompress text with gzip, zlib and DEFLATE

Paste or type any text, pick a format, and this tool returns the compressed bytes as base64 that you can copy, store, or share. Switch to Decompress to turn that base64 back into the original text. A live size line shows the original byte count, the compressed byte count, and how much smaller (or larger) the result is, so you can see at a glance how well your data compresses. Everything runs locally in your browser using the fflate library, so nothing you enter is uploaded.

gzip vs. zlib vs. raw DEFLATE

All three share the same DEFLATE compression core and differ only in their framing. Raw DEFLATE is the bare compressed stream with no header or checksum. zlib wraps DEFLATE in a 2-byte header plus an Adler-32 checksum, the format used inside PNG and many network protocols. gzip adds a longer header and a CRC-32 checksum and is what .gz files and HTTP Content-Encoding: gzip use. Data compressed in one format will not decode as another, so choose the format that matches wherever the bytes came from.

Frequently asked questions

What is the difference between gzip, zlib and raw DEFLATE?

They all use the same DEFLATE algorithm but wrap it differently. Raw DEFLATE has no header or checksum, zlib adds a 2-byte header and an Adler-32 checksum, and gzip adds a larger header and a CRC-32 checksum. Because the framing differs, you must decompress with the same format that was used to compress.

Why is the compressed output shown as base64?

Compressed data is raw binary and cannot be pasted or stored safely as plain text, so it is encoded as base64. When you decompress, paste the base64 back in and the tool decodes it before decompressing.

Is my text uploaded anywhere?

No. Compression and decompression happen entirely in your browser with JavaScript, so your text is never sent to a server.