Loading Base64 to GZIP Converter...

How to Use Base64 to GZIP Converter - Complete Guide

Step 1

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:

•
Paste directly: Copy Base64 GZIP data from your API response or database
•
Upload a file: Pick a text file containing the Base64 string, or a raw .gz file (it is read as bytes and turned into Base64 for you)
•
Try the sample: Load example data to see the decompression in action
Step 2

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.

•
Base64 decoding: Converts the text representation back to compressed binary
•
GZIP decompression: Inflates the compressed data to its original form
•
Checks along the way: The GZIP checksum is verified, and cut-off, damaged or non-GZIP input gets an error that says which
Step 3

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.

•
Copy to clipboard: Copy the decompressed text
•
Download as file: Save the decompressed bytes, named after the file stored in the GZIP header when there is one

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.