Gzip & Deflate Compress / Decompress Online Compress and decompress gzip/deflate, offline.
100% offline
Level
Input179 chars · 1 lines
Output−63% · 0.37×92 chars
Compressed · gzip · 179 B → 67 B (0.37×)
H4sIAAAAAAAAAwvJSFUoLM1MzlZIKsovz1NIy69QyCrNLShWyC9LLVIoAUrnJFZVKqTkp+sphAwKxQBqGMr0swAAAA==

About Gzip & Deflate Compress / Decompress Online

Gzip and DEFLATE are the compression formats that power most of the web — from `Content-Encoding: gzip` HTTP responses to `.gz` archives and the zlib streams embedded inside PNGs, PDFs, and Git objects. This free online gzip tool compresses and decompresses data in all three flavours — gzip, zlib (deflate), and raw deflate — right in your browser.

Paste a JSON blob or log line to see how small it gets, pick a compression level from 0 to 9, and read off the exact byte savings and ratio. Need to inspect a captured gzip payload? Paste its Base64 and decompress it back to readable text — the tool auto-detects gzip from its magic bytes.

Everything runs locally with the well-tested pako library. Nothing you paste is uploaded, so it is safe for private payloads, API responses, and proprietary data.

Features

  • Compress and decompress gzip, deflate (zlib), and raw deflate
  • Adjustable compression level (0–9) with live size and ratio readout
  • Auto-detects gzip streams from their 0x1f 0x8b magic header
  • Base64 in/out so compressed bytes round-trip as copyable text
  • Runs entirely offline — your data never leaves the device

How to use

  1. Choose Compress, then paste the text you want to shrink.
  2. Pick a format (gzip, deflate, or raw deflate) and a level from 0 to 9.
  3. Read the original → compressed size and ratio badge, then copy the Base64 output.
  4. To reverse it, switch to Decompress and paste the Base64 of the compressed bytes.

Frequently asked questions

What is the difference between gzip, deflate, and raw deflate?

All three use the DEFLATE algorithm. "Raw deflate" is just the compressed stream. "Deflate" (zlib) wraps it with a 2-byte header and an Adler-32 checksum. "Gzip" adds a longer header (starting with the bytes 0x1f 0x8b), a timestamp, and a CRC-32 — it is what HTTP Content-Encoding: gzip and .gz files use.

Does the compression level change the result?

Level affects only how hard the compressor works, not correctness — any level decompresses identically. Higher levels (up to 9) usually produce smaller output at the cost of speed; level 0 stores the data without compressing. 6 is the common default.

Why is the output shown as Base64?

Compressed data is raw bytes that are not printable text, so the tool encodes it as Base64 to display and copy it safely. When you decompress, paste that same Base64 back in and you get the original text out.

Is my data uploaded anywhere?

No. All compression and decompression runs locally in your browser using the pako library and the built-in TextEncoder/TextDecoder APIs. Your input never leaves your device.

Why does compressing tiny input make it larger?

Gzip and zlib add header, checksum, and framing bytes. For very short or already-compressed input there is nothing to squeeze, so that fixed overhead makes the output bigger — the ratio badge turns amber to flag it.

Everything runs locally in your browser — your input is never uploaded.