Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Gzip & Deflate Compressor / Decompressor

Gzip, zlib and DEFLATE both ways, with every header field and checksum explained.

Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 / $5.99 for 30 days On this device: nothing is sent
+3 +1 more details No uploadWorks offline once opened Developer

Free preview: the sizes, the ratio and every header field and checksum, with the first lines of a decompressed result (up to 20). Locked until you unlock it: download and copy.

Pro pass ₹179 for 30 days or ₹79 for 1 week, one‑time. Pro pass $5.99 for 30 days or $2.99 for 1 week, one‑time. How to unlock

Try before you buy.

  • Free preview: the sizes, the ratio and every header field and checksum, with the first lines of a decompressed result (up to 20).
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Next steps Done. What next?

Start over

A Pro pass unlocks the full result. See passes

All developer tools

About the Gzip & Deflate Compressor / Decompressor

Decompress gzip, zlib and raw DEFLATE data pasted as Base64 or hex, or opened as a file — or compress text and files into any of the three and, with a pass, take the result as Base64, hex or a download. The format is recognised from its first bytes, and Base64 wrapped in another layer of Base64 is unwrapped too, as you get when reading a Helm release secret through kubectl.

Every result comes with its details: sizes and compression ratio, the gzip header (original file name, comment, modification time, operating system, extra fields) and whether the CRC-32 or Adler-32 checksum matches. Files made of several gzip members are decompressed in full, padding after the data is ignored and reported, and a truncated file still gives back everything up to the point where it breaks. Nothing is uploaded: the work happens in your browser.

Without a pass the result is a free preview: the sizes, the ratio, the header fields and the checksums, with the first lines of a decompressed result. A Pro pass unlocks the whole output, with Copy, the download and Use as input.

How to use it

  1. Choose Decompress or Compress, then the format — Auto-detect recognises gzip and zlib from their headers when decompressing.
  2. Paste the data into the box (Base64 such as H4sI…, hex such as 1f 8b 08 …, or escaped bytes) or switch to File and open or drop the file. To compress, type or paste the text, or open a file.
  3. When compressing, pick a level: the browser’s default, 1 for speed, 9 for the smallest output, or 0 to store without compressing. For files, gzip can also store the original name and modification time.
  4. Read the sizes, the ratio and the header fields. A failed checksum means the data is damaged.
  5. With a pass, or after unlocking this result, copy it, download it, or press Use as input to reverse the step.

Examples

Decompress gzip pasted as Base64
Input
H4sIAAAAAAAAA8tIzcnJBwCGphA2BQAAAA==
Result
hello

5 bytes from 25 (gzip, CRC-32 3610a686 — correct)
Compress text to zlib, shown as hex
Input
hello hello hello
Result
78 9c cb 48 cd c9 c9 57 c8 40 90 00 3a 2e 06 7d

Compressed with the browser’s default level; another compressor may choose different but equally valid bytes. 78 9c is the zlib header for the default level, and the last 4 bytes are the Adler-32 checksum of the text.

Read a Helm release stored as a Kubernetes secret
Input
kubectl get secret sh.helm.release.v1.my-app.v1 -o jsonpath='{.data.release}'
Result
Paste the command’s output: it is Base64 (from Kubernetes) of Base64 (from Helm) of gzip. Both layers are removed and the release JSON is shown.

Common uses

  • Reading compressed API payloads, message-queue bodies and webhook data that arrive as Base64.
  • Decoding Helm release secrets, compressed log lines and Base64 blobs in configuration files.
  • Checking a .gz file’s original file name, modification time and checksum without unpacking it on a server.
  • Recovering the readable part of a truncated or partly damaged .gz log.
  • Measuring how well a payload compresses at different levels before turning on gzip for an API.
  • Producing a gzip or zlib test fixture for code that must decompress it.

gzip, zlib and raw DEFLATE

All three hold the same DEFLATE-compressed data (RFC 1951); they differ in what is wrapped around it.

  • gzip (RFC 1952) starts with 1f 8b, has a header with an optional file name, comment and modification time, and ends with a CRC-32 and the original size. .gz files, Content-Encoding: gzip and Helm release data use it. A gzip file may contain several members one after another (as when .gz files are concatenated); they decompress to their contents joined together.
  • zlib (RFC 1950) has a 2-byte header — 78 01, 78 5e, 78 9c or 78 da for the four level hints — and an Adler-32 checksum at the end. PNG images, many network protocols and HTTP’s Content-Encoding: deflate use it.
  • raw DEFLATE has no header and no checksum. ZIP files and the SAML HTTP-Redirect binding use it; because nothing identifies it, it is the fallback when neither header is found.

What the gzip header tells you

  • File name and comment: written by gzip (unless run with -n) and some libraries; this tool stores the name only when you ask it to.
  • Modified: the time stored in the header, shown in your time zone and in UTC; 0 means none was stored.
  • Extra flags: 2 means the compressor used its slowest, strongest setting, 4 its fastest.
  • Operating system: the system the file was compressed on, from RFC 1952’s list (3 is Unix, 0 FAT, 11 NTFS, 255 unknown).
  • CRC-32 and size from the trailer, compared with the decompressed data: a mismatch means damage.

Limitations

  • Files up to 100 MB can be opened, and decompression stops when the output passes 256 MB, as a guard against decompression bombs.
  • Brotli, Zstandard, bzip2, xz, Unix compress (.Z) and ZIP archives are other formats. The tool names those it recognises from their first bytes (Brotli has no signature, so it cannot be recognised). ZIP archives can be opened with the ZIP extractor.
  • The gzip header holds a file name only in Latin-1 characters (RFC 1952), so a name in another script is not stored in it; the download keeps your file’s name.
  • The browser’s default compression level cannot be changed or named; choose a number from 0 to 9 for a level you control.
  • Raw DEFLATE carries no checksum, so damaged raw data may decompress to wrong bytes without an error.
  • zlib streams made with a preset dictionary cannot be decompressed without that dictionary.

Privacy

On this device: nothing is sent

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

What do I get without a pass?

Without a pass, Gzip & Deflate Compressor / Decompressor shows the sizes, the ratio and every header field and checksum, with the first lines of a decompressed result (up to 20). Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

How do I decompress a Base64 string that starts with H4sI?

H4sI is how the gzip signature 1f 8b 08 looks in Base64. Paste the whole string with Decompress selected: it is decoded from Base64, recognised as gzip and decompressed in one step. Strings starting with eJ or eN are usually zlib.

Why does the result say several gzip members?

gzip allows several compressed members in one file, one after another — for example when .gz files are joined with cat, or written in blocks by tools such as bgzip. Their contents belong together, so all members are decompressed and joined, and each member’s checksum is checked.

What does “trailing bytes were ignored” mean?

There is data after the end of the compressed stream. Zero bytes there are usually padding from a tape, a disk image or a transfer, and are harmless. Anything else may be another, damaged gzip member or unrelated data.

Why is my compressed output different from the gzip command’s?

Different compressors (and levels) find different but equally valid encodings, and the header differs too: the command stores the file name and time, while this tool stores them only on request. Both decompress to exactly the same data.

Is the data sent anywhere?

No. Compression and decompression run in your browser, and the page works offline once loaded.

Learn more

Lessons on MySmartCoPilot Learn that use this tool:

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.