Base64 to GZIP Converter: Decode and Gunzip Base64 Strings
Decode a Base64 string that holds gzipped data, such as a compressed field in an API response or a log line, and get the original text or file back.
Loading Base64 to GZIP Converter...
How to Use Base64 to GZIP Converter - Complete Guide
Paste Base64-Encoded GZIP Data
Enter your Base64-encoded GZIP data into the input area. This is typically data that was previously compressed with GZIP and then encoded to Base64 for transmission. You can:
Automatic Base64 Decoding & GZIP Decompression
The tool automatically performs two operations: first decoding the Base64 text back to binary data, then decompressing the GZIP-compressed content to reveal the original data.
View & Export Decompressed Data
The decompressed data appears in the output panel. You can copy it to your clipboard or download it. If what was gzipped is not text, the panel shows its size instead and Download saves the exact bytes.
Useful Resources
Frequently Asked Questions
What does Base64 to GZIP decoding actually do?
Two things, in order. The Base64 text is turned back into the bytes it stands for, and those bytes are gunzipped to get what was compressed in the first place. You meet this pair a lot in API responses, message queues and log lines, where a gzipped payload has to travel inside JSON or another text format.
How can I tell that a Base64 string is gzipped?
Look at the first four characters. Every GZIP stream starts with the bytes 1f 8b 08, and in Base64 that comes out as "H4sI". If your string starts differently, it is probably something else: "eJ" or "eN" is usually ZLIB (try Base64 to ZLIB), and "UEsD" is a ZIP file. When the data is not GZIP, the error message says what it looks like instead.
Is my data sent to a server?
No. The Base64 decoding and the decompression both happen in your browser with the pako library. Nothing you paste or upload leaves your machine, and nothing is kept once you close or reload the page.
Why does it say the data looks cut off or damaged?
GZIP ends with a checksum and the original length, so a string that was copied only partly, or truncated by a database column or a log line limit, can be detected. "Cut off" means the compressed data stops early; "the checksum doesn't match" means the bytes were changed somewhere along the way. Copying the whole string again fixes most of these. Errors in the Base64 itself, such as a stray character, are reported with their line and column.
Can I paste a data: URI or URL-safe Base64?
Yes. A data:application/gzip;base64, prefix is skipped, URL-safe Base64 with - and _ and without = padding is read too, and so are line breaks, a string wrapped in quotes, and a byte-order mark at the start. You can also upload a raw .gz file; it is read as bytes and turned into Base64 for you.
What if what was gzipped is not text?
It still decompresses. An image, a .tar archive or any other binary file can't be shown as text, so the output panel shows its size instead, and Download saves the exact bytes, named after the file stored in the GZIP header when there is one, otherwise decompressed.bin.
How do I go the other way?
Use GZIP to Base64 to compress text and get the Base64 string. If you have a .gz file and just want what is inside, GZIP Decompression works with the file directly.
Related Tools
PDF to Base64
Convert PDF files to Base64 encoded strings for APIs and databases
Base64 to PDF
Turn a Base64 string back into a PDF file you can download
File to Base64
Convert any file type to Base64 encoded strings for universal data transmission
Base64 to File
Decode Base64 strings to any file type with automatic format detection
GZIP to Base64
Compress data with GZIP and encode to Base64 format
Base64 to ZLIB
Decode Base64 and decompress the ZLIB data inside it