About this tool
Gzip compression and decompression. Quickly and easily compress and decompress gzip strings (this is compression, not encryption).
The Gzip Compression & Decompression gzip-compresses text and returns the result as a Base64 string, and takes a gzip Base64 string back to the original text. Compression uses the DEFLATE algorithm inside the standard gzip container (RFC 1952), the same format as a .gz file or an HTTP Content-Encoding: gzip response, and the Base64 wrapper makes the binary output safe to paste into JSON, a config file or a chat message. It reports input and output sizes as you type, so you can see the ratio for your own payload.
Open Gzip Compression & Decompression on AltFTool — it loads instantly in your browser.
Pick 'Compress' or 'Decompress' mode - the Sample button loads a matching example text or gzip Base64 payload.
Paste your text (or a gzip Base64 string) into the input; the output updates live along with the Input Size, Output Size, Compression and Savings cards.
Copy the Base64 result with 'Copy', or press 'Download' to save it as compressed.txt (decompressed.txt in Decompress mode).
Compress and decompress with the same Base64 convention, so output from one mode pastes straight into the other.
Shows characters, lines and bytes for input and output together, so the real ratio is visible rather than guessed.
Malformed input returns a clear message about invalid gzip Base64 instead of a raw decoder exception.
No. Gzip is compression, not encryption — there is no key, and anyone can decompress the output in seconds, which is exactly what the decompress mode here does. Never use it to protect passwords, tokens or personal data; use real encryption for that.
Because gzip adds a fixed header and trailer (18 bytes of container overhead) and Base64 then inflates every 3 bytes into 4 characters, roughly 33% growth. For short or already-random input there is nothing to squeeze out, so the overhead wins — gzip only pays off on longer, repetitive text.
DEFLATE, defined in RFC 1951, which combines LZ77 back-references with Huffman coding, wrapped in the gzip container of RFC 1952 with a magic number and a CRC-32 check. That is why plain text with repeated words compresses well while a JPEG or ZIP barely moves.
Not the raw file — the input expects the gzip bytes encoded as Base64, not binary. Base64-encode the .gz contents first, then paste; the decompressor strips whitespace and newlines for you before decoding.