How to Open tar.gz Files (Windows, Mac & Online)
The .tar.gz format is everywhere in the Linux and developer world but awkward to open on Windows. This guide covers the fastest no-install method (browser, no upload), the Windows tar command and 7-Zip, the Mac double-click, and Terminal.
Table of Contents
What a tar.gz file actually is
A .tar.gz is two formats stacked together. First, tar (tape archive) bundles many files and folders into a single file, preserving the directory structure but not compressing anything. Then gzip compresses that bundle into a smaller .gz file. The result, file.tar.gz, is one compressed package that unpacks back into the original folder tree.
You meet tar.gz constantly in the developer and Linux world: source code releases, npm and Python packages, server backups, Docker layers, and datasets are almost always distributed this way. If a project on GitHub offers a download, it is usually a .tar.gz or a .zip.
4 ways to open tar.gz, compared
| Method | Install | One step? | Upload |
|---|---|---|---|
| SammaPix online | None (browser) | Yes | No upload |
| Windows tar command | Built-in (Win 11) | Yes | Local |
| 7-Zip (Windows) | Desktop app | No (two steps) | Local |
| Mac double-click / Terminal | Built-in | Yes | Local |
Method 1: Online, no upload (SammaPix tar.gz Extractor)
The SammaPix tar.gz Extractor reads the archive directly in your browser with the libarchive engine compiled to WebAssembly. It handles both layers (gzip and tar) in one step, shows you the file list, and lets you download a single file or the whole thing as a ZIP. Nothing is uploaded, so it is safe for source code and backups, and it works on Windows and Chromebooks where there is no easy native option.
- Open sammapix.com/tools/tar-gz in any browser.
- Drop your file. Drag a .tar.gz, .tgz, .tar or .gz onto the page.
- Browse the contents and download what you need, or export everything as ZIP.
Open a tar.gz with zero install
Drop the file, view the contents, download what you need. 100% in your browser, nothing uploaded.
Open tar.gz Online, FreeMethod 2: Windows (tar command and 7-Zip)
Windows 11 ships with the tar command. Open Command Prompt or PowerShell in the folder with your file and run:
tar -xzf file.tar.gz
The flags mean: x extract, z gunzip, f file. To extract into a specific folder, add -C foldername.
Prefer a GUI? Install 7-Zip. Right-click the .tar.gz, choose 7-Zip then Extract here, which gives you a .tar file. Right-click that .tar and extract again to reach the actual files. It works but takes two passes, which is why the one-step browser or tar command is often simpler.
Method 3: Mac (double-click and Terminal)
On macOS this is easy: double-click the .tar.gz in Finder and Archive Utility unpacks it into a folder next to the file. No app to install. If you want to view the contents or grab one file without unpacking everything, the browser tool is the quicker route. For the command line, see Method 4.
Method 4: Terminal (Linux and Mac)
# Extract everything tar -xzf file.tar.gz # Extract into a specific folder tar -xzf file.tar.gz -C ~/Desktop/extracted # List contents without extracting tar -tzf file.tar.gz # Extract a plain .tar (no gzip) tar -xf file.tar # Decompress a single .gz file gunzip file.gz
The same commands work on Linux and macOS. Use -tzf to peek inside before committing to a full extract.
tar vs gz vs tar.gz vs tgz
- .tar - a bundle of files, not compressed.
- .gz - a single gzip-compressed file (often one .tar, but can be any file).
- .tar.gz - a tar bundle compressed with gzip. The common case.
- .tgz - exactly the same as .tar.gz, just a shorter extension.
You will also see .tar.bz2 (bzip2) and .tar.xz (xz), which work the same way with stronger compression. The SammaPix extractor handles all of these.
Common errors and fixes
"tar is not recognized" on Windows
You are likely on Windows 10, which does not include tar. Use 7-Zip or the browser tool instead, or upgrade to Windows 11.
It only extracted a .tar, not the files
That is the two-step 7-Zip behaviour. Open the resulting .tar to reach the real files, or use a one-step method.
"Unexpected end of archive"
The download was incomplete or corrupted. Download the file again and retry.
After extracting
Got images out of the archive? Compress them with the Image Compressor, or strip location data with the EXIF Viewer. Need to bundle files back up to share? Use the ZIP Creator. And if you receive a .rar or .7z instead, the RAR opener and 7z opener work the same way.
FAQ
How do I open a tar.gz file without installing anything?
Use the SammaPix tar.gz Extractor at sammapix.com/tools/tar-gz. Drop your .tar.gz, .tgz, .tar or .gz file, view the contents, and download individual files or the whole archive as ZIP. It runs entirely in your browser, so nothing is installed and your file is never uploaded.
What is the difference between tar, gz, tar.gz and tgz?
tar bundles many files into one archive without compressing them. gz (gzip) compresses a single file. tar.gz is the combination: files are bundled with tar, then the bundle is compressed with gzip. tgz is just a shorter name for the exact same tar.gz format, common on systems that limit file extensions.
Can Windows open tar.gz files?
Windows 11 includes a command-line tar tool, so you can run 'tar -xzf file.tar.gz' in Command Prompt. There is still no simple right-click extract and no easy way to peek inside without unpacking. For a one-click experience, use 7-Zip (which needs two steps for tar.gz) or a browser tool like SammaPix.
Can macOS open tar.gz natively?
Yes. Double-clicking a .tar.gz in Finder extracts it with Archive Utility. The browser tool is still handy on a Mac when you only want to view the contents or grab a single file without unpacking the entire archive.
Why does 7-Zip open tar.gz in two steps?
Because tar.gz is two layers. 7-Zip first decompresses the gzip layer, leaving a .tar file, then you open that .tar to see the actual files. It works, it is just two clicks. Browser tools and the tar command handle both layers in one step.
Is it safe to open tar.gz files online?
It depends on the tool. Many online extractors upload your archive to their servers, which is risky for source code or backups. The SammaPix tar.gz Extractor processes the file entirely in your browser using WebAssembly, so it never leaves your device.