How to open a .gz file
Gzip archive · Compressed archive
A .gz file is a single compressed file. macOS and Linux decompress it with a double-click or one command; on Windows use 7-Zip. If it is a .tar.gz there is a second layer underneath.
What a .gz file actually is
Gzip compresses exactly one file and nothing else. It has no concept of folders or multiple entries, which is why it is almost always paired with tar when more than one file is involved.
That single-file design is why it dominates on the web and in Unix pipelines: it is fast, streamable and does one job.
Why it will not open
Windows has no built-in gzip support before Windows 11 23H2, so a double-click does nothing. And with a .tar.gz, one extraction leaves you holding a .tar, which reads as failure if you were not expecting two layers.
Renaming it to an extension you can open will not help: changing the extension does not convert the file, it only changes what Windows tries to open it with.
Step by step
Windows
- 01Install 7-Zip, right-click the file, choose 7-Zip then "Extract here".
- 02For a .tar.gz, run it twice: once to produce the .tar, then again on that file.
- 03Or use the built-in tar command in PowerShell: "tar -xf archive.tar.gz" handles both layers at once.
macOS
- 01Double-click. Archive Utility handles .gz and .tar.gz in one step.
- 02In Terminal, "gunzip file.gz" for a single file, or "tar -xzf archive.tar.gz" for the combined form.
What usually goes wrong
Gzip replaces the original by default
Running gunzip on the command line removes the .gz and leaves the decompressed file. Use "gunzip -k" to keep the compressed copy, which matters if you are working on the only copy you have.
Programs that open .gz
Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer. Once you have downloaded it, you can check the file against our index before you run it.
If you end up downloading one of these from somewhere other than the publisher, what you can and cannot verify about that is worth two minutes.
- 7-ZipA file archiver with a high compression ratio.v26.02 · 6 hashed installers95
- NanaZipThe 7-Zip derivative intended for the modern Windows experience.v6.5.1800.0 · 2 hashed installers100
- PeaZipA free file archiver utility and rar extractor for Windows and Linux, work with 200+ archive types and variants, handle spanned archives and support multiple archive encryption standards.v11.2.0 · 4 hashed installers95
Also registers .gz in its manifest
Taken straight from publisher manifests. Some of these handle the format for a narrow purpose rather than as their main job.
Common questions
- How do I open a .gz file on Windows?
- Install 7-Zip and use Extract here, or run "tar -xf file.gz" in PowerShell. Windows 11 version 23H2 and later also handle gzip natively in File Explorer.
- What is the difference between .gz and .tar.gz?
- A .gz compresses one single file. A .tar.gz is a tar bundle of many files that has then been gzipped, so it needs both layers undone to reach the contents.