What is a TAR.GZ File?
A TAR.GZ file, often called a tarball, is a TAR archive that has been compressed with gzip. TAR bundles many files and folders into a single file and keeps their names, folder structure and Unix permissions; gzip then compresses that single file. TAR.GZ is the standard way to distribute source code and software packages on Linux and macOS, and it is widely used for backups.
Because the two steps are separate, some programs show a TAR.GZ file as a .GZ file that contains a .TAR file. Linux and macOS can open it with the built-in tar command, and so can Windows 10 and 11. You can also use 7-Zip, WinRAR or PeaZip.
Download TAR.GZ Sample Files
The sample below is a nested archive: a gzip-compressed TAR file that contains three ZIP files, which in turn hold spreadsheets, an MP3 and JPE images. It is useful for testing tools that need to look inside archives within archives.
TAR.GZ Sample File Details
| File size | 7.5 MB (7,496,662 bytes) |
| Uncompressed TAR size | 7.5 MB (7,496,704 bytes) |
| Compression | gzip (DEFLATE), created on Unix |
| TAR format | POSIX (PAX) |
| Contents | 3 ZIP files containing 7 files in total |
| SHA-256 | 3316007ae32ff09275db0dd0490a47f2f3c4a08c7ec265805c5d01570d72b40b |
| ZIP file inside the archive | Size | Contains |
|---|---|---|
| 48d3f54ebc99e8714deef0711594d6e2.zip | 20 KB | 2 XLSX spreadsheets |
| 824e5918e8f89be0cfe5d8943b663600.zip | 3.9 MB | 1 MP3 audio file |
| b8ccd606293163cd16f327b44348d345.zip | 3.6 MB | 4 JPE images, 640 to 3840 pixels wide |
Because the files inside are already compressed, gzip saves almost nothing here (42 bytes). That is expected: compressing data that is already compressed does not make it smaller, which makes this file a realistic test for compression-ratio checks.
What You Can Test With This TAR.GZ File
- Archive extraction: apps, CI scripts and upload handlers that unpack tar and gzip in one step.
- Nested archives: virus scanners, data-loss prevention and indexing tools that must open archives inside archives.
- Upload limits: size checks and progress bars with a 7.5 MB binary file.
- Download integrity: compare the SHA-256 checksum above after downloading.
- Compression ratios: already-compressed content that barely shrinks.
How to Extract a TAR.GZ File
# List the contents without extracting
tar -tzvf sample.tar.gz
# Extract into the current folder
tar -xzvf sample.tar.gz
# Check the download
sha256sum sample.tar.gz
The same tar commands work in the Windows 10 and 11 Command Prompt and PowerShell. On Windows, use Get-FileHash sample.tar.gz to see the checksum.
TAR.GZ vs Other Archive Formats
| Format | Compression | Typical use |
|---|---|---|
| TAR.GZ | gzip (DEFLATE), fast | Linux software, source code, backups |
| TGZ | Same as TAR.GZ, shorter extension | Same as TAR.GZ |
| TAR.BZ2 | bzip2, smaller but slower | Source code releases |
| TAR | None | Bundling files before compression |
| ZIP | DEFLATE, each file separately | Sharing files on Windows and across platforms |
| 7Z | LZMA2, high ratio | Large archives where size matters |






