Gzip Encode
Free online gzip encode tool, no installation required
About Gzip Compress/Decompress
Compress text to and from a gzip stream, or decompress an existing gzip payload back to text, using the browser's native CompressionStream and DecompressionStream APIs with the "gzip" algorithm. Compressed bytes are surfaced as either Base64 or hexadecimal text so they can be copied, stored, or transmitted easily.
How to Use
1. Set Mode to Compress or Decompress.\n2. Set Encoding to Base64 or Hex (this controls both the compressed output format and the expected decompress input format).\n3. Paste the input — plain text for compression, Base64/Hex for decompression.\n4. Click Compress or Decompress.\n5. Copy the result with the Copy link. Errors are shown in a red banner.
Compression Pipeline & Encodings
Compress: input text is encoded to UTF-8 via TextEncoder, piped through a CompressionStream("gzip"), and the resulting bytes are converted to either Base64 (via btoa over the raw bytes) or lowercase hex (two digits per byte). Decompress reverses this — Base64 is decoded with atob, hex is parsed two characters at a time — then the bytes are piped through DecompressionStream("gzip") and decoded back to text. The mode and encoding must match what was used to produce the input, or an error is shown.
▶Which browsers support this?
▶Should I pick Base64 or Hex?
▶Why does decompression fail?
▶Does it handle binary or non-text input?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee