GZIP
Compress or decompress text using gzip in the browser
About GZIP
Compresses text into a GZIP stream shown as Base64, and turns Base64-encoded GZIP back into readable text. It relies on the browser's built-in CompressionStream and DecompressionStream APIs, so nothing is uploaded, and after compressing it reports the size in bytes before and after. Useful for inspecting compressed payloads such as AWS CloudWatch Logs subscription data or preparing compact test fixtures.
Category: Encoding.
Frequently asked questions
What is GZIP?
▾
GZIP is a file format and compression algorithm based on DEFLATE. It is widely used to compress HTTP responses, reducing transfer size by 60-80% for text-based content.
Why is the output Base64?
▾
GZIP produces binary data. Base64 encoding converts it to a safe ASCII string that can be copied, stored, or sent over text-based channels.
Why is the compressed result bigger than my text?
▾
GZIP adds an 18-byte header and trailer, and Base64 makes the output about a third longer, so short strings grow instead of shrinking. Savings appear with longer or repetitive text such as JSON, HTML or logs; the size line compares your UTF-8 bytes with the raw GZIP bytes, before Base64.
Can I decompress the output with other tools?
▾
Yes. It is a standard GZIP stream, so after Base64-decoding it works with gunzip, Python's gzip module or Node's zlib. In the other direction, only GZIP data in standard Base64 is accepted here, not raw DEFLATE, zlib or Brotli, and the result is shown as UTF-8 text.