GZIP Compressor

Compress files to GZ, BZ2 or XZ online: gzip, bzip2 or xz any file in your browser and download the compressed copy. Free and private, nothing is uploaded.

Files are processed in your browser and never uploaded.

Each file is compressed on its own. To bundle several files into one archive, use Create TAR.GZ or Create ZIP.

How to compress files with gzip, bzip2 or xz

  1. Drop one or more files onto the drop zone above, or click Choose files.
  2. Pick a Format:
    • GZIP (.gz) – fast and understood by practically every system and library.
    • BZIP2 (.bz2) – usually smaller than gzip on text, but slower.
    • XZ (.xz) – usually the smallest result, with the slowest compression.
  3. Click Compress. Each file is compressed on its own and keeps its full name plus the new extension, so report.csv becomes report.csv.gz.
  4. Download each result with its Download button, or use Download all (ZIP) when you compressed several files.

GZIP output is produced by your browser's built-in CompressionStream; BZIP2 and XZ use libarchive compiled to WebAssembly. Your files are not uploaded.

Compressors, not archivers

gzip, bzip2 and xz each turn one input into one compressed output. They have no notion of folders or a list of files, which is why this tool produces a separate .gz, .bz2 or .xz for every file you add. If you want several files inside a single download, put them in an archive first: on Unix systems that means tar, giving the familiar .tar.gz.

A single compressed file is still the right choice in many cases: a large SQL dump or CSV export to upload to a server, a log file to attach to a support ticket, a pre-compressed asset for a web server that serves .gz files directly, or a data file for a script that reads gzip natively.

FormatAlgorithmDecompress on Linux/macOSGood for
GZIP (.gz)Deflategunzip file.gzLogs, web assets, anything needing wide support
BZIP2 (.bz2)Burrows-Wheeler + Huffmanbunzip2 file.bz2Text where gzip is not small enough
XZ (.xz)LZMA2unxz file.xzLarge text or data files for download

The command-line equivalents for compressing are gzip -k file, bzip2 -k file and xz -k file, where -k keeps the original next to the compressed copy. Without it, the original file is deleted.

Things to keep in mind

  • Photos, videos, PDFs, Office documents and ZIP files are already compressed internally, so any of the three formats will make them only marginally smaller.
  • The site can decompress .gz files, but not single-file .bz2 or .xz files. Recipients of those need bunzip2, unxz, 7-Zip or a similar tool.
  • Files over about 700 MB are slow to process in the browser, and inputs over 2 GB are refused.

Tips

Frequently asked questions

Can I compress a whole folder into one .gz?

Not directly, because gzip only holds one file. Create a TAR.GZ instead, which bundles the folder with tar and then gzips it.

Can I choose the compression level?

No. The only option is the format; the compression settings are fixed.

Which format gives the smallest file?

Usually XZ, followed by BZIP2 and then GZIP, but the gap depends on the content. Try two formats on the same file and compare the sizes.

Copied to clipboard