Skip to content
ToolPlankDEV
Encoders & Decoders
100% In-Browser Execution

Updated:

Gzip Decompress Online

Paste Base64 or hex, or drop a .gz file, and read what is inside. This gzip decompress online tool detects gzip, zlib and raw deflate, shows sizes, the file name in the header and the checksum result, and explains clearly when the data is something else. Nothing is uploaded.

Processing in browser...

Loading the tool. It runs entirely in your browser, so your data is never uploaded.

More free tools you may need next.

Quick Guide

How to use Gzip Decompress

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Add the compressed data

    Paste Base64 or hex into the left box, press Paste, drop a .gz file on the box, or press Upload. Sample loads a short gzip string so you can see the result straight away.

  2. 02

    Read the result and the summary

    The decompressed text appears on the right with a strip above it. The strip shows the format, the sizes, the ratio, the checksum result and the file name, time and system stored in the gzip header.

  3. 03

    Set the input and format if needed

    Auto detection handles most data. If it guesses wrong, choose Base64 or hex under Input is, and gzip, zlib or raw deflate under Compression.

  4. 04

    Copy or download

    Press Copy for text, or Download to save the exact bytes as a file. Data that is not text shows its first bytes in hex and can still be downloaded.

How to decompress gzip online

Gzip is a common way to shrink data before it is stored or sent. When it shows up outside a terminal, it is often a long string that begins with H4sI. That is the Base64 form of the two bytes 1f 8b, which start every gzip file. To decompress gzip online, paste the string, and the tool does the rest.

Press Sample to try it. The sample string starts like this:

Text
H4sIAAAAAAACAz3MsQrCMBSF4d2nCGdOpQ1O3dTB...

It is 152 bytes of gzip data. Decompressed it becomes a 169-byte JSON text, and the strip reports gzip, a CRC-32 that matches and the type JSON data. A short text gains little from gzip, which is why the numbers are close. Larger text usually shrinks far more.

Decompress a gzip string from Base64 or hex

Compressed data is binary, so it travels as text in logs, API responses, queue messages and config files, usually as Base64. The reader accepts the plain and the URL-safe alphabet, a data:application/gzip;base64, prefix, text wrapped over several lines, text in quotes, padding that was cut off, and the literal backslash-n sequences you get when a string was copied from JSON.

Hex works too, in the forms people actually paste: continuous 1f8b0800, spaced bytes, 0x1f, 0x8b lists and dumps with colons. Auto detection chooses hex when the text starts with the gzip or zlib signature. Otherwise it reads Base64. If your hex starts differently, for example raw deflate, set Input is to Hex.

The same job in code takes one line in most languages:

Python
import base64, gzip
text = gzip.decompress(base64.b64decode(s)).decode("utf-8")
JavaScript
const text = require("zlib").gunzipSync(Buffer.from(s, "base64")).toString("utf8");

Gzip, zlib and deflate: how the format is detected

Three names are used for closely related data. They all hold the same deflate compression, but each wraps it differently.

  • gzip starts with 1f 8b, then a header that can hold a file name and a time, and ends with a CRC-32 and the original size.
  • zlib starts with a two-byte header such as 78 9c and ends with an Adler-32 checksum. PNG files, Git objects and many libraries use it.
  • Raw deflate has no header and no checksum. ZIP files and some network protocols use it.

In Detect mode the first bytes decide between gzip and zlib. Data with neither signature is tried as raw deflate, but the result is accepted only when it looks like text or a known file type, so random bytes are not shown as if they were a result. Pick Raw deflate by hand to skip that check.

Open a .gz file without a terminal

Not every system opens .gz files without extra software. Drop the file on the left box or press Upload, and the content appears on the right. Download saves it under the name stored in the gzip header when there is one, or under the .gz name without the extension.

  • A .tar.gz file gives you the .tar file. This tool does not unpack tar, so extract it with an archive program afterwards.
  • A text file that holds Base64 or hex, such as .txt or .b64, is read as text, not as a binary file.
  • A file with several gzip members joined together, which logrotate and some tools produce, is read as one stream and the members are joined.

Files up to 50 MB are accepted, and the decompressed result may be up to 100 MB. For larger files use gunzip on the command line.

What the summary strip tells you

  • Format and Read from: which compression was found and how the input was read, such as Base64 or hex.
  • Compressed, Decompressed and Ratio: the sizes in bytes and how much the data grew when unpacked.
  • Checksum: gzip carries a CRC-32 and zlib an Adler-32. A match is a good sign that nothing was damaged. A mismatch is shown in red, because the data may have been altered or cut. The check runs for single-member gzip files and zlib data.
  • File name, Modified and Made on: fields from the gzip header. Many tools leave them empty, and some write a zero time, which is not shown.

Text is shown when the result is valid UTF-8. Bytes that are not valid UTF-8 appear as replacement characters in the preview, but Download keeps the original bytes.

When decompression fails

The message says what was found instead. If the first bytes are 50 4b, the data is a ZIP file, which this tool does not open. A PNG, a PDF or another known type is named the same way. Plain text that was encoded as Base64 is called out as plain text. Brotli data, which some servers send as Content-Encoding: br, is not supported and will be reported as unreadable.

The most common real problem is cut-off data: a log line truncated at a length limit, or a copy that missed the end of the string. The message then says that the compressed data ends too early. Copy the full string again.

Privacy

Compressed payloads often hold logs, tokens and customer data. The data is decompressed in your browser and is not uploaded. The Privacy Policy explains what the site stores.

To go the other way, use Gzip Compress. For plain Base64 text, try Base64 Decode, for files Base64 to File, and for hex text Hex to Text.

Frequently Asked Questions

Technical Q&A for Gzip Decompress

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the Base64 or hex text into the left box and the decompressed text appears on the right. A Base64 gzip string normally starts with H4sI.

Paste the Base64 text. The tool decodes it to bytes, finds the gzip signature and decompresses it. The plain and URL-safe alphabets both work, and so does a data URI.

They use the same deflate compression with different wrappers. Gzip adds a header and a CRC-32, zlib adds a short header and an Adler-32, and raw deflate adds nothing.

No. A ZIP file is a different format that holds several files. If you paste one, the tool recognizes it from the first bytes and says so.

Drop the .gz file on the left box or press Upload. The content appears in the browser, and Download saves it. Nothing needs to be installed.

Gzip data starts with the bytes 1f 8b. In hex that is 1f8b, and in Base64 it is H4sI at the start of the string.

The compressed data is cut off. The text was truncated, or a download stopped early. Copy or download the complete data again.

It removes the gzip layer and gives you the .tar file to download. Unpacking the tar needs an archive program.

Input files up to 50 MB and decompressed results up to 100 MB. Larger data is refused with a message instead of freezing the tab.

No. The data is decompressed in your browser, so it stays on your device.