Base64 Gzip Decode
Decode a Base64 string and gunzip it in one step, in your browser. Useful for compressed API payloads, SAML responses, and gzipped blobs stored as Base64. Everything runs locally — nothing is uploaded.
How to decode and decompress Base64 gzip data
Compressed data is often stored or transmitted as Base64 so it survives text-only channels. To read it you have to reverse both steps: Base64-decode to raw bytes, then gunzip those bytes back to the original text. This tool does both at once. Paste your Base64 above, keep the toggle on Decode + Decompress (the default), and the decompressed text appears instantly — click Copy to grab it. To go the other way, switch the toggle to Compress + Encode to gzip text and Base64-encode the result.
When is data both Base64 and gzipped?
This combination shows up whenever something binary and compressed has to travel through a text-only medium. Common cases:
- SAML responses. SAML SSO messages are DEFLATE-compressed and then Base64-encoded before being placed in a redirect or POST body.
- Compressed API responses. Some APIs gzip a JSON body and hand it back as a Base64 string inside a larger envelope, especially in webhooks and message queues.
- Log and event payloads. Logging and analytics pipelines frequently gzip batches of events and Base64-encode them for transport or storage in a text column.
In each case the fix is the same: decode the Base64, then decompress the bytes.
gzip vs deflate vs zlib
These are closely related formats built on the same DEFLATE algorithm, differing only in their headers and checksums. gzip adds a gzip header and CRC; zlib (often loosely called "deflate") wraps DEFLATE in a small zlib header; raw deflate has no wrapper at all. You don't need to know which one you have — this tool tries gzip, then deflate, then raw deflate and uses whichever decompresses successfully, so the auto-detection just works.
Is this private?
Yes. Decoding and decompression run fully in the browser using the native DecompressionStream API — your data is processed locally and nothing is uploaded to any server. You can confirm in DevTools → Network: decoding fires no request.
Frequently asked questions
How do I decode a Base64 gzip string?
Paste the Base64 into the input above and keep the toggle on Decode + Decompress. The tool Base64-decodes it to raw bytes, then gunzips them with the browser's native DecompressionStream and shows the original text. Click Copy to grab the result.
What's the difference between gzip and deflate here?
gzip and deflate (both zlib-wrapped and raw) are DEFLATE-based formats with different headers. You don't have to pick one — the tool auto-detects by trying gzip, then deflate, then raw deflate, and uses whichever works.
Why did decompression fail?
Usually because the decoded bytes aren't actually gzip or deflate data — the Base64 might be a plain string, an image, or another format. It can also fail if the Base64 is truncated or the compressed stream is corrupt. Confirm the source really is gzipped.
Is my data uploaded?
No. Everything runs in your browser with the native DecompressionStream API. Nothing is sent to a server, which you can verify in DevTools.
Need plain Base64 encode/decode?
The main base64.dev tool handles text, files, and URL-safe mode with auto-detect.
Open base64.dev →