GZip, zlib & DEFLATE Compressor / Decompressor
Compress, decompress and inspect GZip, zlib and raw DEFLATE data from text, files, Hex or Base64.
Related Tools
How to use
- 1.Choose Compress, Decompress or Inspect.
- 2.To compress, enter text or choose a file, pick the format (GZip, zlib or Raw DEFLATE) and a level from 0 (store, no compression) to 9 (maximum compression), select Compress, then download the .gz, .zz or .deflate file or copy it as Base64 or Hex.
- 3.To decompress or inspect, choose a file or paste Hex or Base64, keep Auto-detect or pick a format, then select the action; raw DEFLATE must be chosen explicitly.
- 4.Text output is previewed when it is valid UTF-8; binary output is shown as Hex and can be downloaded with a safe file name.
GZip, zlib & DEFLATE Compressor / Decompressor
GZip (RFC 1952), zlib (RFC 1950) and raw DEFLATE (RFC 1951) carry the same DEFLATE compressed data in different wrappers. GZip adds a header with the magic bytes 1F 8B, the compression method, flags, modification time, extra flags, operating system and optional extra field, original file name, comment and header CRC, plus a trailer with the CRC32 and the original size modulo 2^32; this tool decodes every concatenated member and verifies both trailer values. zlib adds a 2-byte header (CMF and FLG: method, window size, check bits, preset-dictionary flag and level hint) and a big-endian Adler-32 trailer, which is verified. Raw DEFLATE has no header and no checksum, so it cannot be detected automatically and its integrity cannot be checked. The tool shows exactly where a stream is truncated or corrupt. Compression uses the browser's built-in stream for the Default level and the fflate library for levels 0–9.
Privacy
Processing stays in your browser. Input and output are never uploaded or saved in browser storage.
Frequently asked questions
- Why is my compressed output larger than the input?
- GZip adds an 18-byte header and trailer and zlib adds 6 bytes, so very short text or data that is already compressed can grow. The tool shows the bytes added instead of hiding it.
- What is the difference between GZip, zlib and raw DEFLATE?
- All three carry DEFLATE data. GZip (RFC 1952) adds a header with metadata plus CRC32 and size; zlib (RFC 1950) adds a 2-byte header and an Adler-32 checksum; raw DEFLATE (RFC 1951) has no header and no checksum.
- Can the tool detect the format automatically?
- Auto-detect recognizes GZip by its magic bytes 1F 8B and zlib by a valid header. Raw DEFLATE has no signature, so you choose it explicitly; the result always shows which format was used.
- Does the tool support concatenated gzip members?
- Yes. Every member is decoded in order and verified against its own CRC32 and size; trailing zero padding or other trailing bytes are reported as warnings.
- How does it protect against decompression bombs?
- Output is produced in small chunks and stops at 128 MiB or at 200 times the input size after 16 MiB, for GZip, zlib and raw DEFLATE alike. You can raise the limit once for a stopped result.
