A .gz file is a compressed archive that makes files smaller for storage or sharing
A .gz file is a single file that has been compressed using a method called gzip. When you compress a file this way, it takes up less space on your computer and downloads faster over the internet. The .gz extension tells you the file has been squeezed down, but the original file is still inside — you just have to decompress it first to use it.
You will most often see .gz files when downloading software, backups, or large documents from the internet. Sometimes you will see a double extension like .tar.gz, which means the file is actually a collection of multiple files that were bundled together first, then compressed as one package.
Opening a .gz file is straightforward on any computer. Windows, Mac, and Linux all have built-in tools or free programs that can decompress these files in seconds. The process is simple enough that you do not need special technical knowledge.
Key Takeaways
- .gz files are compressed versions of other files, made smaller so they take up less disk space and download faster.
- Windows can decompress .gz files using built-in tools or free programs like 7-Zip; Mac and Linux have decompression built in.
- A .tar.gz file is actually a collection of multiple files bundled together and then compressed as a single package.
- Decompressing a .gz file does not delete the original compressed file — both versions exist on your computer until you delete one.
How to open a .gz file on Windows
Windows 10 and later can decompress .gz files using the built-in File Explorer, though the process is not as obvious as it is on Mac. Right-click the .gz file, select "Extract All", and Windows will create a new folder with the decompressed contents. This takes a few seconds and leaves the original .gz file untouched.
If the "Extract All" option does not appear, or if you prefer a more straightforward tool, download 7-Zip from the official website (7-zip.org). It is free and works on any version of Windows. After installing it, right-click any .gz file, hover over "7-Zip", and select "Extract Here" or "Extract to [filename]". The decompressed file appears in the same folder immediately.
Some people also use WinRAR, which costs money but handles .gz files just as easily. If you work with compressed files regularly, either tool is worth having on hand.
How to open a .gz file on Mac
Mac has decompression built directly into the operating system. Simply double-click the .gz file, and macOS automatically decompresses it in the same folder. The original .gz file stays where it is, and the decompressed version appears right next to it. This happens in seconds with no additional software needed.
If double-clicking does not work for some reason, you can also right-click the file, select "Open With", and choose "Archive Utility". This is the same tool that runs automatically, but it gives you control over the process if something goes wrong.
How to open a .gz file on Linux
Linux systems have gzip decompression built in as a command-line tool. Open a terminal, navigate to the folder where your .gz file is located, and type gunzip filename.gz (replacing "filename" with the actual name of your file). The decompressed file appears in the same directory.
If you prefer a graphical interface instead of typing commands, most Linux desktop environments include a file manager that can decompress .gz files by right-clicking and selecting "Extract" or "Decompress". The exact wording depends on which Linux distribution and file manager you use, but the concept is the same across all of them.
Understanding .tar.gz files
A .tar.gz file (sometimes written as .tgz) is a two-step compression. First, multiple files are bundled together into a single .tar archive. Then that archive is compressed with gzip, creating the .tar.gz file. This is common for software downloads and backups because it preserves the folder structure and file permissions while also making everything smaller.
The good news is that you decompress a .tar.gz file the same way you decompress a regular .gz file. On Windows with 7-Zip, right-click and select "Extract Here". On Mac, double-click it. On Linux, type tar -xzf filename.tar.gz in the terminal. The result is a folder containing all the original files in their original structure.
If you extract a .tar.gz file on Windows and see a .tar file left behind, that is normal — Windows extracted the gzip layer but left the tar layer for you to extract again. Just right-click the .tar file and extract it a second time, or use 7-Zip to extract both layers at once.
What happens after you decompress a file
Once you decompress a .gz file, you have two copies on your computer: the original compressed .gz file and the new decompressed version. You can delete the .gz file if you want to save space, but there is no harm in keeping both. Many people keep the .gz file as a backup in case something happens to the decompressed version.
The decompressed file is now ready to use. If it is a document, you can open it with any program that reads that file type. If it is software, you can run the installer. If it is a backup or archive, you can browse through the files inside.
Why files are compressed with gzip
Gzip compression is one of the oldest and most reliable compression methods in computing. It typically reduces file size by 50 to 90 percent depending on what kind of file it is. Text files, source code, and documents compress very well. Images and videos compress less because they are already compressed in their original format.
Gzip is used everywhere: software downloads, website backups, log files on servers, and large datasets. It is fast, it works on every operating system, and it has been around long enough that every computer can handle it. That is why you will keep seeing .gz files no matter what you do with your computer.
Frequently Asked Questions
Can I open a .gz file without decompressing it?
Some programs can read .gz files directly without decompressing them first, but most cannot. For practical purposes, you should decompress the file to use it normally. Decompression is fast and free, and it leaves the original .gz file untouched.
What if I decompress a .gz file and nothing happens?
Check that the decompression tool actually ran — sometimes it finishes so quickly you miss it. Look in the same folder where the .gz file is located for a new file or folder. If you still see nothing, try a different tool like 7-Zip on Windows or verify that the .gz file is not corrupted by downloading it again.
Does decompressing a .gz file delete the original?
No. Decompressing creates a new file and leaves the .gz file where it is. You now have both versions on your computer. You can delete the .gz file if you want to save space, but the decompressed version will remain.
Can I compress my own files into .gz format?
Yes. On Mac and Linux, right-click a file and select "Compress" or use the command line. On Windows, 7-Zip can create .gz files — right-click a file, select "7-Zip", then "Add to archive" and choose gzip format. This is useful for sending large files over email or backing up data.