GZIP compress a file
Create .gz files using your browser built-in compression engine, which is handy for logs, backups and web assets. It runs entirely on your device.
Drop files here or click to browse
Results
How to gZIP compress a file
- Drop the files you want to compress.
- Run to gzip them.
- Download the .gz files.
What gzip is and how it differs from ZIP
Gzip compresses a single file. It does not bundle multiple files together, which is why on Unix systems you see the two-step form .tar.gz: tar collects the files, gzip compresses the result. On its own, gzip is the compression method behind most of the web: servers send HTML, CSS and JavaScript gzip-compressed, and browsers decompress it on arrival. It uses the same DEFLATE algorithm as ZIP, so the compression ratios are similar, but the container is simpler and the file just gets a .gz suffix.
What this tool produces
Each file you drop in becomes its own .gz file using the compression engine built into your browser. The result is a standard gzip file that gunzip, 7-Zip, WinRAR, macOS Archive Utility and every web server understand. The original file name is kept with .gz appended.
When gzip is the right choice
- Pre-compressing web assets. Some static hosts and CDNs serve a
.js.gzor.css.gzfile directly if it exists next to the original, saving the server from compressing on every request. - Shrinking log files before archiving or attaching them to a support ticket. Logs compress by 90% or more.
- Database dumps and CSV exports that need to be emailed or uploaded. A 200 MB SQL dump is commonly 20 MB gzipped.
- Matching a system that expects .gz, such as a data import that reads gzipped CSV, or a deployment pipeline.
- Single large files where a ZIP container adds nothing.
Where it does not help
Gzip cannot shrink data that is already compressed. JPG, PNG, MP4, MP3, PDF and modern Office files will come out roughly the same size or fractionally larger. For photos and video, use the dedicated image and video compressors instead.
| Input | Typical gzip result |
|---|---|
| Server log, 50 MB | 3 to 5 MB |
| CSV export, 100 MB | 10 to 20 MB |
| JSON API dump, 20 MB | 2 to 3 MB |
| Minified JavaScript, 1 MB | 250 to 350 KB |
| JPG photo, 4 MB | 4 MB |
Restoring the file
To get the original back, use the gunzip tool, or on the command line gunzip filename.gz. Because gzip is a single-file format, there is no listing step; decompressing simply yields the original file. Compression runs on your device using the browser's native engine, so nothing is uploaded and large files are handled quickly.
Frequently asked questions
What is a .gz file?
It is a gzip-compressed file, common for web assets, logs and Unix backups. Squish creates them using your browser native engine.
Are my files uploaded?
No. Compression uses your browser own engine and your files stay on your device.
Can I gzip more than one file?
Yes. Drop a batch and each file is compressed to its own .gz.
Your files never leave your device
Every tool on Squishly Tools is 100% free and runs entirely inside your browser. Your images and documents are processed on your own computer and are never uploaded to a server. There are no accounts, no watermarks and no catch.