Gzip & Zlib Decompress Online

Inflate gzip, zlib or raw deflate data, or compress text the other way. Uses your browser's built-in compression streams; nothing is uploaded.

How to decompress gzip or zlib data

  1. Paste the compressed bytes as Base64 (the usual form in JSON payloads, logs and HTTP captures) or as hex (1f 8b 08 00 …), or click Open .gz / .zz file.
  2. Leave Format on auto-detect, or choose it yourself, and click Run.
  3. The decompressed text appears on the right. JSON is pretty-printed automatically; binary output (an image, a tar archive) is shown as Base64 so nothing is lost.

Example: H4sIAAAAAAAAA/NIzcnJBwCCidH3BQAAAA== is the gzip of Hello. Switch Action to Compress to go the other way and get gzip, zlib or raw deflate output as Base64.

gzip vs zlib vs raw deflate

FormatStarts withWhere you meet it
gzip (RFC 1952)1F 8B; Base64 H4sI.gz files, Content-Encoding: gzip, AWS CloudWatch Logs subscriptions, Kafka and many APIs
zlib (RFC 1950)78 01, 78 9C or 78 DA; Base64 eJ or eNPNG chunks, PDF streams, Python zlib.compress, PHP gzcompress, Git objects
raw deflate (RFC 1951)No headerZIP entries, SAML redirect binding, PHP gzdeflate, WebSocket permessage-deflate

All three use the same deflate algorithm and differ only in the header and checksum (CRC-32 for gzip, Adler-32 for zlib, none for raw). Auto-detection reads the first two bytes: 1F 8B means gzip, a valid zlib header (checksum divisible by 31) means zlib, and anything else is tried as raw deflate.

Common sources

From a terminal the same jobs are gunzip -c file.gz, base64 -d data.txt | gunzip, and in Python zlib.decompress(data, 47), where 47 auto-detects gzip or zlib headers.

FAQ

Can it extract .zip or .tar.gz archives?

It decompresses the gzip layer of a .tar.gz, giving the tar bytes as Base64, but it does not list files inside tar or zip archives.

Why do I get "Could not inflate the data"?

The data is incomplete, was copied with extra characters, or uses a different format. Check that the Base64 is complete, then try each format manually.

Is my data uploaded?

No. Compression and decompression run in your browser with the standard CompressionStream and DecompressionStream APIs.