Home/Developer Tools/Gzip / Deflate Decompressor
📤

Gzip / Deflate Decompressor

Decompress a .gz or raw deflate file back to its original bytes

Free · No sign-up required

What this does

Decompresses a GZip (.gz) or raw zlib-compressed file back to its original bytes, entirely in your browser. These are the two compression formats behind an enormous amount of everyday data transfer — every web response your browser receives is very often gzip-compressed in transit without you seeing it — and occasionally you end up with a .gz file or a compressed API response that needs decompressing directly rather than being handled automatically by whatever normally does it.

GZip versus raw zlib — which one you have

  • GZip wraps the compressed data in a small header and footer containing metadata like the original filename and a checksum. A file ending in .gz, or beginning with the byte signature 1f 8b, is GZip.
  • Raw zlib (deflate) is the compressed data alone with no wrapper — no filename, no checksum, just the compressed bytes. This shows up inside other formats and protocols that manage their own framing, most often as an HTTP response encoded with Content-Encoding: deflate, or as a data blob extracted from inside another file format.

Picking the wrong one produces garbage output or an outright error, since the decompressor is looking for a header that is not there. If you are not sure which you have, GZip is by far the more common of the two as a standalone file — try that first.

Where these files come from

  • Log files rotated and compressed by a server (access.log.gz).
  • API responses saved to disk while the server's gzip compression was still applied.
  • Source tarballs on Unix systems, commonly .tar.gz — note this needs two steps: decompress the gzip layer first, then extract the resulting .tar archive separately, since tar and gzip are two independent formats stacked together.
  • Compressed data embedded inside another file format that a specialised tool has extracted for you.

Frequently asked questions

My file is .tar.gz — will this fully extract it?

This removes the gzip compression layer only, giving you back a .tar file. That .tar archive then needs a separate tar-extraction step, since tar and gzip are two independent formats commonly stacked together.

How do I know if I have GZip or raw zlib?

A file ending in .gz, or one starting with the two bytes 1f 8b, is GZip. If GZip mode fails with an error, try zlib (raw) instead.

Why did decompression fail?

Either the wrong format was selected, or the file is corrupted or incomplete — an interrupted download is a common cause of a file that looks right but fails to decompress.

Can this also compress a file, not just decompress?

No, this tool only reverses compression. For compressing files, ZIP Archiver bundles and compresses into the more universally supported ZIP format instead.

Is there a file size limit?

It runs in your browser's memory, so very large files are limited by your device's available memory rather than any fixed cap.

Is my file uploaded anywhere?

No. Decompression happens entirely in your browser.

More tools in this category

🔐
Base64 Encoder & Decoder
Encode and decode text in Base64 format
🔢
Number Base Converter
Convert between binary, decimal, hex, octal and text
🌐
IP Address Converter
Convert an IPv4 address between dotted decimal, binary, hex and integer
Bitwise Calculator
AND, OR, XOR, NOT and bit-shift two numbers with the binary shown
🔡
Text to ASCII / Binary / Hex
Convert text to ASCII codes, binary, hex or decimal and back
🔢
Word Counter
Count characters, words, sentences, paragraphs and lines