GZip Base64 Encoder & Decoder
Decode a payload or open a .gz file. Compress text, inspect the result, and share a working example.
Local processing · No upload for conversion · No sign-up
Drop a .gz or UTF-8 text file here. Nothing is uploaded.
Paste a payload, open a file, or try an example.
Sharing includes this input and settings. Use an example you can share.
Try a working Base64 GZip example
How to decode Base64 GZip to text
- Paste the complete encoded value into Input, or open a local
.gzfile. A quoted JSON string is accepted; an entire JSON object is not. - Select Decode & Decompress. The tool decodes Base64 into bytes, then decompresses the GZip data.
- Read the UTF-8 text, copy it, or download the exact decoded bytes. For JSON or XML, the result offers a direct handoff to the JSON formatter or XML formatter.
To go the other way, paste ordinary text and select Compress (GZip + Base64). The output is a Base64 string containing compressed bytes, ready for a text field that expects this format.
Auto input handles standard Base64, Base64URL, line wrapping, omitted padding, Base64 data URIs, and GZip hex starting with 1f8b. No characters inside the decoded message are rewritten. Enable Auto-run last operation for repeated edits, or use Reverse conversion to round-trip a result.
GZip vs Base64: compression and encoding are different
GZip compresses bytes. Base64 represents bytes as printable characters; it does not compress or encrypt them. For the format handled here, the order is text → UTF-8 → GZip → Base64. Decoding reverses those steps. See the GZip format and Base64 specification.
Base64 adds roughly one third to the compressed byte count. Small inputs may therefore produce a longer result than the original text. Check the final Base64 length when a destination has a size limit.
Choose level 1 for speed, level 6 for a balance, or level 9 when a smaller GZip result matters more than compression time. Compression level is a trade-off, not a promise that every input will shrink. Correct GZip producers may emit different Base64 strings for identical text because headers, metadata, or compression choices differ; compare the decoded bytes instead.
Share the input and the operation
After a conversion, use Share to let someone open the same input and operation. The embedded-data option keeps the sample in the link without uploading it to the sharing service. The optional short-link service stores it for 30 days. Anyone with either link can read the included data, so choose a small example you are happy to share.
The guide examples below use synthetic data and self-contained links. When posting a question or writing documentation, include the important input and expected output in the text, with the runnable link alongside them.
GZip and Base64 guides with runnable examples
Java GZip Base64: Compress and Decode Strings with UTF-8
Decode Base64 GZip in Java with a complete UTF-8 example. Fix GZIPInputStream errors, limit decompression, and share a runnable sample.
Decode Base64 GZip to JSON: A Worked Example
Decode a Base64 GZip string into readable JSON, understand the H4sI prefix, and share a working example that opens directly in the browser tool.
GZip + Base64 in Python and Node.js: Matching Examples
Compress UTF-8 text to Base64 GZip in Python and Node.js, decode it across languages, and compare the results with a runnable browser example.
Base64 GZip Decode Errors: Padding, Headers, and H4sI
Diagnose invalid Base64, incorrect GZip headers, truncated payloads, and unreadable output. Compare your input with a working, shareable example.
Common Base64 GZip questions
How do I decode a GZip Base64 string starting with H4sI?
Paste the complete value and choose Decode & Decompress. H4sI represents the usual GZip header bytes 1f 8b 08. The decoder checks the compressed stream and its checksum before displaying UTF-8 text. The prefix alone does not prove that a payload is complete.
Can I decompress a .gz file online without uploading it?
Yes. Open or drop a binary .gz file into the input panel. It is read locally, shown as Base64, and decompressed in a background worker. Download output preserves the decompressed bytes; Download .gz preserves the compressed stream. ZIP files are not supported.
Does this accept Base64URL, missing padding, line breaks and hex?
Yes. Auto input accepts standard Base64, Base64URL, omitted padding, whitespace wrapping, a quoted JSON string, and Base64 data URIs. Hex beginning with 1f8b is recognized automatically; choose Hex for other hex values. Transport-damaged spaces are never guessed to be plus signs.
What does an incorrect header or checksum error mean?
A header error means the decoded bytes are not valid GZip; plain Base64, zlib, ZIP and raw DEFLATE are different formats. A checksum or truncated-stream error means the complete GZip data could not be verified. Re-copy the original payload rather than trusting partial output.
What happens if the decompressed content is binary or not UTF-8?
The tool keeps the exact decompressed bytes and offers a .bin download instead of replacing invalid characters. It decompresses one GZip stream, including concatenated GZip members, but does not unpack a tar archive or interpret an image, PDF, or other binary format.
What are the size limits?
Encoded input can be up to 3 MiB; compressed bytes and UTF-8 text to compress can be up to 2 MiB. Decompressed output is capped at 8 MiB, and conversion stops after 8 seconds. These limits protect browser responsiveness. Share a smaller example under 1 MiB.
Is my input uploaded, and what is included in a share link?
Conversion and local file reading happen in your browser, without uploading the payload. Sharing includes the input, operation, and conversion settings, not a local file name. Embedded links contain the data in the URL fragment; optional stored links upload it only when you choose that method. Neither kind is encrypted: anyone with the link can read it.
Revising how compression and encodings work for a technical interview? Synapticz is an AI quiz generator for interview prep: paste your notes on GZip, Base64 or anything else, get practice questions, and let spaced review bring them back before you forget.
Decoding plain, uncompressed text? Use the Base64 decoder. For broken compressed payloads, follow the padding, header, checksum and truncation guide.