§

Paste or type the text you want to compress.

For binary data (e.g. images, documents) use the file upload form below.
§

Output

gzip
Original (bytes): 0 · Compressed (bytes): 0 · Ratio:
§

Compress files with GZIP

Select a file to upload and compress.

Drag & Drop file here or click to select

US-based platform teams compress payloads with gzip everywhere Brotli is not yet supported: AWS Lambda response bodies under the 6 MB synchronous limit, Datadog APM trace ingest, the gzipped S3 `PutObject` body that triggers a downstream EMR job, and the Cloudflare Workers KV values where every saved byte is metered. UK SaaS teams running GOV.UK PaaS or AWS London-region workloads use the same RFC 1952 gzip variant so cross-Atlantic cache layers, including Fastly, can serve the bytes verbatim. This compressor runs entirely inside the browser via the native CompressionStream API — useful when staging compressed test fixtures without touching a build server or CI runner.

What is GZIP compression?

GZIP is a lossless compression file format defined by RFC 1952. It wraps a payload produced by the DEFLATE algorithm (RFC 1951), which combines LZ77 back-references with Huffman coding to shrink repetitive data into a compact byte stream.

How does GZIP compression work?

Your input is processed entirely in your browser using the native CompressionStream('gzip') API. The high-level steps are:

  1. The tool converts your text or file into a stream of bytes (UTF-8 for text input).
  2. Those bytes are fed through a CompressionStream configured for the gzip format.
  3. The browser applies DEFLATE: a sliding-window LZ77 pass finds repeated sequences, and Huffman coding assigns shorter codes to common symbols.
  4. A 10-byte gzip header and an 8-byte footer (CRC32 of the original data plus the original length modulo 2^32) are wrapped around the DEFLATE payload, producing a standard .gz container.
  5. The result is rendered as Base64 or hex for text input, or offered as a downloadable .gz file for binary input.

Why compress with GZIP?

  • Smaller payloads: text, JSON, HTML, CSS, and source code typically shrink to a fraction of their original size.
  • Industry standard: GZIP is understood by virtually every HTTP server, CDN, browser, archive tool, and programming language standard library.
  • Privacy: compression happens entirely in your browser. The input never reaches our servers.
  • Round-trip ready: the output decompresses with the gunzip CLI, with HTTP Content-Encoding: gzip, and with any RFC 1952 reader in Python, Node.js, Go, Java, or Rust.

What are common applications of GZIP compression?

GZIP is used across the web and in command-line tooling:

  • HTTP transfer: web servers compress responses with GZIP so pages load faster over the network.
  • Log archival: long-lived server logs are stored as .gz files to cut disk usage.
  • Backups and bundles: tarballs (.tar.gz) compress entire directory trees for portable distribution.

What does a GZIP compression example look like?

A 1 KB JSON document with many repeated field names commonly compresses to around 200–300 bytes — a four- to fivefold size reduction. Large text logs often compress by 90% or more. Inputs that are already compressed (JPEG, PNG, MP4, ZIP) will not shrink further and may grow by a few bytes of GZIP framing.

This GZIP compressor produces standard RFC 1952 output directly in your browser. Whether you're shrinking a payload before transmission or producing a .gz file for archival, the result interoperates with every GZIP-aware tool on the network.