What Is a GZ File and How Do You Unzip It?

What is a GZ file?

Did you just download a GZ file and now you’re staring at it wondering what it is and how to open it? Don’t worry—you’re not alone. Many people come across this unfamiliar file extension when downloading software, backups, or archives from the internet, especially from Linux or Unix systems. The good news is that GZ files are quite common, and with the right tools, you can easily open and extract them on Windows, macOS, and Linux.

In this guide, we’ll explain everything about the GZ file format: what it is, why it exists, and, most importantly, how to unzip a GZ file on different operating systems. Whether you’re using Windows 10, macOS, or Linux, by the end of this article, you’ll know multiple ways to open GZ files—from the command line to using third-party apps.

What Is a GZ File?

A GZ file is a type of archive format that has been compressed using the Gzip compression algorithm. The gzip format was created by Jean-loup Gailly and Mark Adler back in 1992 as part of the GNU Project. It’s primarily used on Unix systems (like Linux and macOS) to reduce file sizes and save storage space or speed up file transfers.

Here are the key points about the GZ file format:

  • Extension: .gz
  • Type: Compressed single file (not multiple files by default).
  • Purpose: Reduce the size of large files using the gzip compression algorithm.
  • Supported Systems: Commonly used on Unix systems, but can be opened on Windows, macOS, and Linux with the right tools.

It’s important to note that a GZ file usually contains just one file that has been compressed. If you see a tar.gz file or a tgz file, that means the tar utility was used to bundle multiple files into a single archive first, and then the entire tar archive was compressed with gzip.

So, in short:

  • GZ file → single compressed file.
  • TAR.GZ file → collection of files first bundled with tar and then compressed with gzip.

This is why GZ is often associated with software packages, backups, or archives distributed online.

How to Open a GZ File on Windows

If you’ve downloaded a GZ file on Windows, you might find that the operating system doesn’t natively recognize this file extension. Unlike ZIP files, which Windows can handle out-of-the-box, you’ll need either the command line or a third-party compression utility to unzip a GZ file.

1. Unzip a GZ File on Windows Using the Terminal or Command Prompt

Windows 10 and newer versions include the Windows Subsystem for Linux (WSL), which allows you to run Unix commands. If you have WSL enabled, you can use the gzip or tar utility directly from the command line.

Here’s how:

  1. Open Command Prompt or PowerShell.
  2. Navigate to the directory where your gz file is located using the cd command. cd Downloads
  3. Use the tar command to extract: tar -xvzf filename.tar.gz
    • x → extract
    • v → verbose (show details)
    • z → use gzip
    • f → file name
  4. Your files will be extracted into the same directory as the original.

For a single gzip file (not tar.gz), use:

gzip -d filename.gz

This will decompress the original file back to its original file name and format.

2. How to Open GZ Files Using Apps on Windows

If you don’t want to use the command line, there are plenty of third-party tools that let you open and extract GZ files using a graphical user interface (GUI).

Some popular options include:

  • 7-Zip: Free, open-source, and supports many archive formats like ZIP, TAR, and GZ.
  • WinRAR: Another powerful compression utility that can handle gz archives.
  • PeaZip: Lightweight and versatile.

How to do it with 7-Zip:

  1. Download and install 7-Zip.
  2. Right-click the .gz file.
  3. Select 7-Zip > Extract Here or Extract to folder_name.
  4. The original file will appear in the same folder.

This method is great for people who prefer files using a GUI instead of typing commands.

How to Extract a GZ File on macOS

If you’re on a Mac, you’re in luck: macOS has built-in support for the gzip format, so you don’t need to install anything extra to decompress a gz file.

1. How to Unzip a GZ File on macOS Using the Built-In Tool

  1. Locate your gz file in Finder.
  2. Simply double-click the file.
  3. macOS will automatically extract it into the same folder.

This is the easiest way to open a gz file on macOS, especially if it’s just a single file.

If you’re dealing with a tar.gz file, the system will unzip tar.gz files into a folder containing all the files inside the tar archive.

2. Using the Terminal to Unzip a GZ File on macOS

For advanced users, the Terminal gives more control.

  1. Open Terminal (Applications > Utilities > Terminal).
  2. Navigate to the directory containing your file: cd ~/Downloads
  3. To extract a .gz file: gunzip filename.gz This replaces the gz archive with the original file.
  4. To extract a tar.gz file: tar -xvzf filename.tar.gz

Using the command line on macOS is especially useful when working with multiple files, directories, or large files.

How to Unzip a GZ File on Linux

Since the gzip format was primarily used on Unix, it’s no surprise that Linux handles it effortlessly. Whether you prefer the command line or a graphical archive utility, you can open gz files easily.

1. Opening .GZ Files in the Command Line on Linux

The command line is the most common way to open a gz file on Linux.

  • To decompress a single gzip file: gzip -d filename.gz or gunzip filename.gz
  • To unzip tar.gz files (multiple files inside a tar archive): tar -xvzf filename.tar.gz

These commands extract files into the same directory as the original.

2. How to Open a GZ File on Linux Using the Built-In Tool

Most Linux distributions come with an archive utility with a graphical user interface.

For example, in Ubuntu:

  1. Right-click the gz file.
  2. Select Open With Archive Manager.
  3. Click Extract and choose a destination folder.

This method is beginner-friendly and avoids using the command line.

Conclusion: Opening Your GZ File on Any OS

A gz file is an archive that has been compressed with gzip, a compression algorithm created by Jean-loup Gailly and Mark Adler. While the format is used primarily on Unix systems, you can open and extract gz files on all major operating systems today.

  • On Windows, you can use the command line with tar or install 7-Zip or another third-party utility to unzip gz files.
  • On macOS, you can simply double-click the file or use Terminal commands like gunzip and tar.
  • On Linux, you can use the command line (gzip, tar) or the built-in archive manager with a right-click.

Whether you’re dealing with a single .gz file or a tar.gz archive that bundles multiple files into a single archive, knowing how to open, extract, and decompress it across Windows, macOS, and Linux gives you great flexibility.

Don’t let unfamiliar file formats slow you down — once you grasp the command line methods or the right compression utilities, opening a gz file becomes second nature. And if you’re also handling ZIP files or looking for alternatives to the usual tools, you might enjoy our article on the 7 Best Free Alternatives to WinRAR and WinZip in 2025 — it’s a handy companion read to help you choose powerful third-party apps across all operating systems.

SHARE IT

Facebook
Twitter
LinkedIn
Reddit

Related Article