GZip Decompress Online

Paste gzip data as Base64 or hex and read the original content back.

Gzip data (Base64 or hex)
Decompressed text
Runs locally in your browser

About the GZip Decompress Online

Gzip shows up in places where you cannot easily reach for a shell: a Content-Encoding: gzip body captured in a proxy, a compressed column in a database row, a cookie value, or a queue message that a service packed before sending. Since raw gzip bytes are binary, they travel as Base64 or as a hex dump, and this page takes either. The detector looks at the characters before deciding, and you can force the choice when the data is ambiguous.

Before inflating anything the first two bytes are checked against the gzip magic number 1f 8b, so a Base64 string that is really a zlib stream, a ZIP archive or a PNG is reported clearly instead of failing deep inside the decoder. The stream is expanded with pako, a JavaScript port of zlib, so the file never leaves your machine and the size of the input is limited only by your browser memory. The status line reports the compressed size, the decompressed size and how much the compression saved.

When the content is not text, for example a gzipped image, the Text view refuses to print replacement characters and asks you to switch the output to Hex or Base64 so you can inspect the bytes honestly. Streams that start with 78 are zlib rather than gzip and belong in the zLib Decompress tool. If your data is Base64 wrapping something else entirely, start with the Base64 decoder.

How to use

  1. Paste the gzip data as Base64 or as a hex dump.
  2. Leave Input is on Detect, or pick the encoding yourself.
  3. Read the text in the right pane and check the size saving in the status line.
  4. Switch Show result as to Hex when the payload is binary.

Common questions

Can I decompress a .gz file?
Yes, if you first turn the file into Base64, for example with base64 on the command line, then paste the result here.
Why do I get a message about magic bytes?
Every gzip stream starts with 1f 8b. If those bytes are missing the data is a different format, most often a bare zlib or deflate stream.
Is my data uploaded anywhere?
No. Decoding and inflating both happen in the page, so the payload stays on your computer.
What does the percentage in the status mean?
It is how much smaller the compressed form was than the original, so 80% means the gzip data was one fifth of the size.