GZip Decompressor for Text, Base64, Hex, Files

Decode GZip streams inside your browser. Choose text, Base64, Hex, or uploaded .gz archives. Large inputs load quickly with live stats.

Input source

Feed text, Base64, Hex, or .gz

Large editors support keyboard shortcuts, wrap mode, and readable contrast.

Need format tips?Hex input accepts uppercase or lowercase pairs. Base64 mode trims whitespace automatically. File uploads stay inside the browser session.

Press Ctrl+Enter to refresh. Editors resize for long payloads.

Decompressed result

Readable output

Review clean text, share previews, and copy snippets without leaving this page.

Compressed bytes

0

Decompressed bytes

0

Compression ratio

0%

Current format

Text

Those two bytes - 1F 8B - that turn up where you least expect them

Open a captured API response, scroll through a log bundle, or crack open a backup someone left on a shared drive, and sooner or later you hit it: a wall of unreadable bytes beginning with 1f 8b. That little signature is gzip waving at you. This page hands the text back, and it does the whole thing inside your tab - nothing travels to a server.

You paste. It expands. That is the entire arrangement.

Why so much of the web shows up squeezed

Text repeats itself. Constantly. The same HTML tags, the same JSON keys, the same log timestamps marching down the page. Gzip spots those patterns and records them once instead of a thousand times. Underneath, the DEFLATE method pairs LZ77 - which swaps repeated chunks for short back-references - with Huffman coding, which hands the most common bytes the shortest codes. For ordinary text that pairing usually trims size by 60 to 90 percent.

Servers lean on this every second of the day. A response goes out carrying Content-Encoding: gzip, the browser quietly unpacks it, and nobody watching the page ever notices. Less bandwidth, faster first paint, smaller bills.

There is a catch, though. There always is. Anything already compressed gains nothing here - JPEGs, MP4s, ZIP files, most binaries. Run gzip over them and you can finish a few bytes larger, because you have bolted a header onto data that had no slack left to give.

What actually sits inside a .gz stream
Magic + header10 bytesOpens with 1F 8B, names the method (DEFLATE), then notes flags, a timestamp, and the source OS.
Optional extrasvariesAn original filename, a comment, or a header checksum - present only when the flags say so.
DEFLATE payloadvariesThe compressed body. This is the part that unfolds back into your readable text.
CRC-324 bytesA fingerprint of the original data. If it disagrees after unpacking, something is corrupt.
Original size4 bytesThe uncompressed length, stored modulo 4 GB - which is why very large files report a misleading number.

That layout earns its keep the moment a decompression fails. No leading 1F 8B? You are likely holding raw zlib, or a Base64 string that never decoded. A complaint about the CRC? The bytes arrived damaged or cut short. The error this tool surfaces tends to point straight at one of those.

Moments where pasting bytes beats the terminal

A handful of situations where this page quietly wins:

  • Reading a response you captured mid-flight

    Your proxy logged a gzipped JSON body as Base64. Drop it in, read the payload, carry on - no curl gymnastics required.

  • Confirming compression is even happening

    The byte counts and ratio tell you at a glance whether the server is really shipping something smaller, or just claiming to.

  • Peeking inside a stray .gz

    A log fragment, a config export, a chunk of a backup - when you only want to see what is in there before committing to a full extract.

With the Base64 and Hex paths especially, it helps to keep the encoding and the compression as two separate layers in your head. If a string refuses to expand here, decode it first with the Base64 decoder, or run it through Base64 to Hex to check you are actually holding gzip bytes and not a double-wrapped blob.

Gzip is not the only stream you will run into

Its close cousins catch people out. Raw zlib uses the same DEFLATE core but wraps it in a slim 2-byte header instead of gzip's full structure - feed one to the other and you get an error, nothing more. When that happens, the zlib decompressor is the right door. Brotli and LZMA/7z are different algorithms altogether and will not open here at all.

If you are weighing formats, or just curious what else lives nearby, the compression toolset keeps the decoders in one spot.

One limit worth saying out loud: this is a decompressor, not a compressor. It reads gzip; it does not make it. And since everything runs inside the browser tab, genuinely huge files lean on your own device's memory rather than a server's - fine for logs and payloads, far less fun for multi-gigabyte archives.

Before you reach for the terminal

Things that trip people up with gzip

Most decompression headaches come down to a handful of mix-ups - wrong format, a double-encoded string, or a size field doing exactly what the spec says. Here are the ones worth knowing.

My Base64 string will not decompress - where do I start?

Nine times out of ten the string is not gzip, or it is wrapped twice. Decode the Base64 first and check the result: real gzip bytes begin with 1F 8B. If you see plain text instead, it was never compressed; if you see another layer of Base64, peel that off and try again.

Why does the original size look wrong on a large file?

Gzip stores the uncompressed length in just four bytes, so it wraps around every 4 GB. Anything larger reports its size modulo 4 GB, which can read as deceptively small. The decompressed bytes themselves are still correct - only that trailer field is limited.

Can it open a .tar.gz archive?

It removes the gzip layer, but a .tar.gz is a tar archive that was then gzipped. You will get the raw tar stream back - readable file names mixed with binary padding - rather than separate extracted files. For that, a tar-aware extractor is the right tool.

Is gzip the same thing as a ZIP file?

No. A ZIP file is a container that can hold many files with its own directory; gzip is a single compressed stream with no concept of multiple entries. They share the DEFLATE method internally, which is the only reason they feel similar.

It errors out even though I am sure the data is compressed - why?

The most common cause is feeding zlib data into a gzip reader. Zlib uses a 2-byte header and no 1F 8B signature, so gzip rejects it outright. Try the zlib decompressor instead. Truncated or partially copied input triggers the same failure.

Does any of this reach a server?

No. The decoding runs in your browser tab using JavaScript, so the bytes you paste or upload never leave your device. That also means very large inputs draw on your own memory rather than a server pool.

Maintained by ToolexeLast updated June 24, 2026