Skip to content

Gzip Compress Online

Drop any file to get a .gz download, or paste text to receive its gzip bytes as Base64. Everything happens in your browser.

Processed locally in your browser

Options

The compression level cannot be chosen: the browser API does not expose it.

What is Gzip Compress Online?

Gzip is the compression format behind .gz files, HTTP Content-Encoding: gzip and most Linux backups. It wraps a Deflate stream with a small header and a CRC-32 checksum. Zlib (“deflate” in the browser API) and raw deflate are close cousins with a lighter wrapper.

This tool uses the standard CompressionStream API, so the work is done by the browser itself, streaming the file in small slices with a progress bar. You get one download per file, with the original name and modification time stored in the gzip header, plus the original size, compressed size and ratio. Text pasted in the second field is gzipped and returned as Base64.

How does it work?

  1. Drop one or more files, or paste text in the text field instead.
  2. Choose gzip (.gz), zlib (.zz) or raw deflate (.deflate); keep the file name in the header if you want.
  3. Click the run button and watch the progress; the sizes and the ratio appear when it finishes.
  4. Download each .gz file, or copy the Base64 result for the text.

Common use cases

  • Compressing a large log or SQL dump before sending or archiving it.
  • Preparing a gzip payload for an HTTP test or a fixture, as Base64 text.
  • Checking how well a file compresses before choosing a storage format.
  • Creating .gz files on a machine where gzip is not installed.

Examples

Drop any file to get a .gz download, or paste text to receive its gzip bytes as Base64. Everything happens in your browser.

Privacy

Gzip Compress Online runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

The compression level cannot be chosen because the browser API does not expose it, so the browser’s default is used. Already-compressed files (JPEG, MP4, ZIP) will not shrink, and gzip compresses one file at a time, it does not bundle folders like .tar.gz.

Frequently asked questions

Can I choose the compression level from 1 to 9?

No. CompressionStream has no level option, and this tool does not pretend otherwise. The browser uses its default level, which is a good speed and size balance for most files.

Will the .gz work with gunzip and 7-Zip?

Yes. The output is standard RFC 1952 gzip. The original file name and date are written into the header, so gunzip -N restores them.

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

All three use the same Deflate compression. Gzip adds a header with the name and time and a CRC-32; zlib adds a 2-byte header and an Adler-32; raw deflate adds nothing. Use gzip for .gz files.

More tools in File Tools →