Gzip Decoder & Decompressor
Decompress Base64, hex or a .gz UTF-8 text file, then copy or download the result. Compress text into gzip too. Processing runs locally, with explicit size limits.
Up to 1 MiB compressed input and 8 MiB decompressed UTF-8 text. Binary archives and ZIP files are not supported. Processing stays in your browser.
Gzip and HTTP compression
Gzip bytes commonly begin with 1f 8b 08. Base64 is a separate way to represent those bytes as text. HTTP Content-Encoding: gzip normally carries binary gzip bytes, not Base64; a browser may already have decompressed the response. Gzip is not a ZIP archive.
RFC 1952 · RFC 9110 §8.4.1.3Input Size
Output Size
Compression Ratio
Gzip decompress: Base64 or hex to text
Paste Base64-encoded gzip bytes or hex starting with 1f 8b, then choose Decompress. The result is readable text; Compress creates Base64 gzip from text.
This is a gzip payload tool, not a ZIP archive extractor. It does not currently upload or open .gz files.
RFC 1952 — GZIP formatHow to Use Gzip Decoder
Choose Mode
Select Compress (text to gzip) or Decompress (gzip to text) mode.
Enter Input
Paste Base64-encoded gzip data or plain text depending on the mode.
Convert & Review
Click Convert and check the size comparison and output.
What is Gzip?
Gzip is a file format and software application for compression and decompression. It uses the DEFLATE algorithm, which combines LZ77 and Huffman coding. Gzip is widely used for reducing file sizes in web servers, data transfer, and file archiving.
Common Uses
Web Compression
HTTP servers compress responses to reduce transfer size
File Archiving
Creating .gz compressed archives of files
API Payloads
Compressing large JSON or text payloads in APIs
Why Base64 + Gzip Together?
Raw gzip data is binary — it cannot be stored or transmitted in places that only accept text. Base64 encodes the compressed bytes into safe ASCII characters, which is why "Base64-encoded gzip" shows up everywhere in modern systems:
Cloud error payloads
Some application-defined JSON error fields contain compressed data encoded as Base64; this is not a universal S3 error response format.
Serverless & queue messages
Lambda payloads and SQS/Kafka messages are compressed then Base64-encoded to stay text-safe
HTTP & API bodies
HTTP gzip bodies are binary gzip bytes. Base64 is an additional encoding only when an application chooses to put those bytes into a text field.
Logs & webhooks
Compressed log batches and webhook payloads shipped as Base64 strings
This tool handles the combination in one step: paste the Base64 string, and it decodes Base64 and decompresses gzip back to readable text. Hex-encoded gzip bytes (like 1f 8b 08) are also accepted.
Frequently Asked Questions
When compressing already-small or highly random data, Gzip compression may not reduce size, and Base64 encoding adds ~33% overhead. This tool shows the size comparison so you can evaluate the benefit.
Compressed input is limited to 1 MiB and decompressed UTF-8 text to 8 MiB. Processing stops when the output limit is exceeded. Use a file decompressor for larger or binary payloads.
No. Gzip compresses a single stream or file. The .zip format is an archive format that can contain multiple files with individual compression. Gzip is simpler and often used for single-file compression and HTTP content encoding.
Paste the Base64 string into the input box with Decompress mode selected. The tool first decodes Base64 back to binary gzip bytes, then decompresses them with the DEFLATE algorithm and shows the readable text. No manual two-step decoding is needed.
All three use the same DEFLATE compression algorithm but wrap it differently. Zlib adds a small header and checksum around the raw deflate stream. Gzip wraps deflate in a file format with a header, timestamp, and CRC32 checksum. In HTTP Content-Encoding, "gzip" is the standard value even though the payload is usually just a gzip-wrapped deflate stream.
gzip file.txt compresses to file.txt.gz and deletes the original; -k keeps it. Decompress with gunzip file.txt.gz or gzip -d. For many files at once, tar czf archive.tar.gz dir/ bundles and compresses in one step, and tar xf unpacks. zcat streams a .gz file without writing anything - handy for compressed logs.
This page does not offer a compression-level selector. It uses the encoder’s default settings; the result depends on your input. If you need a specific level, use a compression tool that exposes that setting.
Compression results depend on the input, implementation and settings. HTTP encoding negotiation must support the selected format at both ends. This page decodes gzip; it does not decode Brotli or Zstandard.
Base64-encoded gzip almost always starts with H4sI, which is the gzip magic bytes 1f 8b after Base64 encoding; raw hex gzip starts with 1f8b. If your blob starts differently, it may be zlib (78 9c), raw Deflate, or plain Base64 of uncompressed text — try the Base64 URL decoder instead.
Yes. Whatever you paste or type is kept as a draft in your browser's local storage, and the page restores it — with the results already re-parsed — the next time you open the tool. Clearing the input erases the draft. The data never leaves your device: no account, no upload, no server-side copy. Keys and secrets you enter for verification are never saved.
Authoritative References
Primary sources behind this tool - official standards and specifications, not secondhand summaries.
RFC 1952 - GZIP File Format Specification
The IETF GZIP file format specification: header fields, DEFLATE, and CRC32.
zlib - A Massively Spiffy Compression Library
The zlib compression library home — the reference implementation behind gzip.
Gzip - Wikipedia
The gzip format and tool history, from DEFLATE to tar.gz archives.
Encode, decode, and convert between text encodings like Base64, URL, Hex, HTML entities, and more