GZip Decompress Online
Decompress GZip data from Base64, hex, or a .gz file.
GZip Decompress Online
Paste GZip-compressed data as Base64 or hex, or open a .gz file, and read the original content instantly. The tool detects the input encoding automatically, shows the decompressed text (or lets you download binary output), and reports the compression ratio. Switch to Compress mode to create GZip data from your own text.
What is GZip?
GZip was written by Jean-loup Gailly and Mark Adler in 1992 as a free replacement for the Unix compress utility, and its format is specified in RFC 1952. A GZip file is a thin wrapper around DEFLATE-compressed data:
- a 10-byte header starting with the magic bytes
1F 8B, then08for the DEFLATE method, flags, a timestamp, and the operating system; - optional fields such as the original file name;
- the compressed DEFLATE stream;
- an 8-byte trailer with a CRC-32 checksum and the original size.
Because of those magic bytes, GZip data encoded in Base64 almost always starts with H4sI — an easy way to spot it in JSON, cookies, or database columns.
Where you'll meet GZip
The most common place is HTTP: servers send Content-Encoding: gzip and browsers unpack responses transparently. You'll also find GZip in .gz and .tar.gz archives, compressed log files, Kubernetes and Helm payloads, message queues, and API fields that store compressed JSON as Base64 to save space. Developers often need to peek into such a value while debugging — this page does exactly that.
How it works
The page uses the browser's native DecompressionStream('gzip') API, so there are no libraries and no uploads. Input pasted as H4sIAAAA... is treated as Base64, while 1f 8b 08 00... is parsed as hex. If you accidentally paste zlib data, the tool recognizes the 78 9C header and switches automatically. Click Sample to decompress a small JSON document.
Working with PHP gzcompress() output or PNG streams? Use zLib Decompress. To decode plain Base64 text, try Base64 Encode / Decode.
Frequently Asked Questions
How do I know if my data is GZip?
GZip data always starts with the bytes 1F 8B. In hex that's 1f8b08..., and in Base64 it almost always begins with H4sI. If your string starts with eJ or eN instead, it's zlib — switch to the zlib format or just paste it, since the tool auto-detects the header.
Can I open a .gz or .tar.gz file here?
Yes, click Open File to load a .gz file from your computer. A plain .gz decompresses to the original file. A .tar.gz decompresses to a TAR archive, which is binary — use Download to save it and extract the TAR with an archive tool.
Why do I get 'not valid GZip' or 'truncated' errors?
The data may be incomplete (common when copying from logs), it may have been decoded as text and re-encoded, or it may be a different format such as Brotli, zstd, or a ZIP file (starts with PK). Make sure you paste the complete Base64 or hex, without surrounding quotes.
Is my data sent to a server?
No. Decompression uses the browser's built-in DecompressionStream API, so everything runs locally on your device, even for large files and confidential payloads.