About this tool
The Gzip / Zlib / Deflate tool compresses and decompresses data entirely in your browser using the native CompressionStream and DecompressionStream APIs. Pick the container format — gzip (the .gz format with its 0x1F 0x8B magic bytes), zlib/deflate (the DEFLATE data wrapped in a zlib header), or deflate-raw (bare DEFLATE with no header) — and a direction. Compression takes your UTF-8 text and returns the compressed bytes encoded as base64 or hex; decompression takes base64 or hex and returns the original text.
Because it uses the browser's built-in streaming compression, nothing is uploaded and no external library is loaded — your data stays on your device. The three formats are not interchangeable: gzip and zlib add different headers and checksums (CRC-32 for gzip, Adler-32 for zlib) around the same DEFLATE payload, while deflate-raw omits both, so you must decompress with the same format you compressed with. After compressing, the tool reports the original size, the compressed size, and the compression ratio as a percentage (1 − compressed / original), which is how much smaller the output is.
Highly repetitive text compresses dramatically; short or already-compressed input can actually grow because of the header and checksum overhead, which is normal. If your browser does not expose CompressionStream the tool says so rather than producing wrong output. Note that the native API uses a fixed default compression level, so there is no level selector. Copy the result with one click.