What Is a TAR.GZ File?
A .tar.gz file (also written as .tgz) is a two-step archive format used widely in Linux, macOS, and developer toolchains. First, TAR (Tape Archive) bundles one or more files into a single container while preserving file names and metadata. Then GZIP compression is applied on top to reduce the total file size.
You may encounter .tar.gz files when downloading datasets, ML model weights (such as safetensors files), open-source software packages, or server backups.
Individual vs Combined Mode
Individual Mode (default)
Each dropped file is compressed into its own archive. This is useful when you need to send or store files separately but want each one compressed. Every row shows the original size, the output size, and the savings percentage so you can see exactly how much was gained.
Combined Mode
Tick Combine all files into one archive to bundle everything into a single archive. This is the classic use case - packaging a whole folder of files (models, configs, scripts) into one distributable archive.
TAR vs TAR.GZ
Plain .tar bundles files without any compression - output will be roughly the same size as the inputs plus small header overhead. This is useful when your files are already compressed (JPEG, MP4, ZIP) or when you just need a single-file container without the GZIP pass. .tar.gz adds GZIP compression on top and is better for text files, code, JSON, safetensors weights, and other compressible data.
How to Compress Files
- Drop one or more files onto the drop zone, or click Browse Files.
- Choose whether to apply GZIP and whether to combine into one archive.
- Click Compress - each row updates with output size and savings.
- Download files individually per row, or use Download archive in combined mode.
How Compression Works in the Browser
This tool uses two browser-native APIs - no external libraries required:
- TAR builder - A lightweight in-page implementation packs your files into a valid TAR stream with proper 512-byte headers and padding.
- CompressionStream API - The browser's built-in GZIP encoder compresses the TAR stream. This is the same algorithm used by command-line
gzip.
Your files never leave your machine - everything runs entirely in browser memory.
How Much Will My Files Compress?
Compression ratios depend heavily on the file type:
- Plain text, JSON, CSV, HTML, code - Excellent compression, often 60-90% size reduction.
- Safetensors / PyTorch weights - Moderate compression. Float32 model weights compress by roughly 5-20%.
- Already-compressed formats (ZIP, JPEG, MP4) - Little to no reduction. Use plain .tar for these.
- Binary data (EXE, DLL, databases) - Varies widely, typically 10-40% reduction.
Privacy & Security
Your files are read directly by your browser using the File API and processed entirely in memory. No data is sent to any server. You can load the page, disconnect from the internet, and the tool will still work perfectly.
Browser Support
The CompressionStream API used for GZIP is supported in Chrome 80+, Edge 80+, Firefox 113+, and Safari 16.4+. Plain TAR (no GZIP) works in all modern browsers.
Frequently Asked Questions
Can I compress very large files like multi-GB model weights?
Yes, but your browser will need enough RAM to hold the file in memory during processing. For a 4 GB safetensors file, you need roughly 8-10 GB of free RAM. On devices with limited RAM, split large archives into multiple smaller ones.
What is the difference between .tar, .tar.gz, and .zip?
TAR is an archive-only format (no compression). TAR.GZ adds GZIP compression on top. ZIP combines archiving and per-file compression in a single format. TAR.GZ is standard on Unix/Linux systems and is better at compressing multiple files together because GZIP sees the whole stream.
Can I extract the .tar.gz file on Windows?
Yes. Windows 10 and 11 include built-in TAR support in Command Prompt (tar -xzf archive.tar.gz). You can also use 7-Zip, WinRAR, or any modern archive manager.
Can I add more files after I've already dropped some?
Yes. Drop more files at any time and they will be added to the list. Hit Compress again to process the new additions.