Gzip, Zlib & Deflate Tool
Decompress a gzip, zlib or raw deflate stream — or compress data yourself. The container is detected automatically from the leading bytes.
Detected automatically where possible
Uses the browser's built-in compression engine, so nothing is uploaded and there is no library to download. gzip, zlib and raw deflate all use the same DEFLATE algorithm and differ only in their headers — which is why picking the wrong one gives an error rather than garbage.
Frequently Asked Questions
What is the difference between gzip, zlib and deflate?
They all use the same DEFLATE compression algorithm and differ only in the wrapper. gzip adds a 10-byte header starting 1f 8b plus a CRC32 footer; zlib adds a 2-byte header starting 78 plus an Adler-32 checksum; raw deflate has no wrapper at all. Picking the wrong one gives an error rather than corrupt output.
How do I know which one my file uses?
Look at the first two bytes. 1f 8b is gzip. 78 01, 78 9c or 78 da is zlib. Anything else is likely raw deflate — or not compressed at all. The tool checks this for you and corrects the setting automatically.
Is there a size limit?
Only your device's memory. Compression runs through the browser's native streaming API, so multi-megabyte files are handled comfortably.
Does this need a JavaScript library?
No. It uses CompressionStream and DecompressionStream, which are built into every current browser. That means no download, no dependency, and nothing sent to a server.