Browser processing Input is processed on your device. Privacy & storage

Gzip Compress / Decompress

Real gzip in your browser: text → .gz file or Base64, and back again.

Direction
Result

What this tool does

Gzip is the compression format behind HTTP transfer encoding, .tar.gz archives and log rotation. This page compresses text into a genuine gzip stream — the output starts with the familiar 1f 8b magic bytes and can be opened by gunzip, 7-Zip or any unzip utility — and decompresses the same data back to text.

Compression runs on the browser's built-in CompressionStream, the same native API web servers and service workers use, so there is no library and no network round trip. The Base64 output is convenient when you need to embed compressed data in source code, a JSON payload or a database field; the download gives you a standard .gz file.

FAQ

Why did my short text get bigger?

Gzip adds a header, trailer and dictionary setup — around 20 bytes of overhead. Text under a few dozen characters, or text with no repetition, can grow slightly. Real content like logs, JSON and prose typically shrinks 60–90%.

Which browsers support this?

Chrome, Edge, Safari 16.4+ and Firefox 113+. The tool tells you if your browser lacks the API.

Can it decompress any .gz file?

Any gzip stream the browser API accepts — including files produced by this tool, web servers and gzip on the command line. Multi-member and non-gzip formats (zip, bzip2) are not supported.