How to unzip a GZ file in Windows 10/11 [Quick Guide]

by Teodor Nechita
Teodor Nechita
Teodor Nechita
Software Managing Editor
Eager to help those in need, Teodor writes articles daily on subjects regarding Windows, Xbox, and all things tech-related. When not working, you may usually find him either... read more
Affiliate Disclosure
  • GZ files are a compressed file format that most UNIX and Linux users are probably familiar with.
  • Unzipping them isn't that easy, but it is still possible with the right tools.
  • To learn more about how to open a variety of file formats, check out our File Opener Hub.
  • If more helpful tutorials are what you need, check out our How-To section as well.
extract GZ file

For those of you that don’t have much experience with compressed file formats, a GZ file is a form of compressed files created using the gzip compression utility.

Windows users may not have the chance to encounter this format too often, since it is mostly used in UNIX and Linux systems.

However, these files are extremely useful even on Windows, since they contain precious information, such as the original file name and timestamp.

Because of their importance, we’ve decided to create a step-by-step guide that will show you exactly how to extract a GZ file easily.


How do I extract GZ files on Windows 10?

Since GZ files are compressed formats, after all, it goes without saying that extracting them requires a utility that can perform this task.

That being the case, we would like to recommend you try out WinZip, the world’s best file archiver and unzipper.

The program is extremely lightweight and intuitive, and once you install it on your PC, it integrates itself into your interface, allowing you full access to its toolset whenever the opportunity arises.

Other useful features:

  • Powerful file encryption
  • Ability to split and un-split big files
  • Can extract multiple archives at once
  • Integrated data backup and sharing options

Here’s how you can use WinZip to extract GZ files:

  1. Download and install WinZip.
  2. Right-click on the GZ file.
  3. Select one of the Unzip options available.

Note: You will be automatically directed to extract the file found in the folder that contains it.

There are other options to choose from this context menu, but in the case at hand, none have anything to do with extraction, so we’ll ignore them.

Once you’ve followed these steps, the file’s content should now be extracted in the location of your choosing.

WinZip

WinZip

Any type of compressed file format that you are dealing with can be easily opened with WinZip. Take advantage of teh offer now!

Free trial
Get it now

Unzip a GZ file using Command Prompt

It is very easy to unzip a GZ file on Windows 10 using Command Prompt, also known as cmd. It is a built-in app which allows you to communicate with the OS through commands.

1. Press the Windows Key to open the Start Menu.

2. Type in cmd to search for Command Prompt.

3. Right click on the result and select Run as Administrator. You will now be able to access Command Prompt with Administrator rights.

4. Type in the following command: tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION

unzip gz file windows cmd

5. Press Enter to initialize the command you just typed.

6. You are now able to unzip GZ files in Windows 10.


How can I unzip GZ files with Powershell?

  1. Press Start
  2. Type in powershell and launch PowerShell with Administrative privileges
  3. Type in the following command and press Enter to apply it:
function unzip($path,$to) {
    $7z = "$env:TEMP\7z"
    if (!(test-path $7z) -or !(test-path "$7z\7za.exe")) { 
        if (!(test-path $7z)) { md $7z | out-null }
        push-location $7z
        try {
            write-host "Downloading 7zip" -foregroundcolor cyan
            $wc = new-object system.net.webClient
            $wc.headers.add('user-agent', [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox)
            $wc.downloadFile("http://softlayer-dal.dl.sourceforge.net/project/sevenzip/7-Zip/9.20/7za920.zip","$7z\7z.zip")
            write-host "done." foregroundcolor green

            add-type -assembly "system.io.compression.filesystem"
            [io.compression.zipfile]::extracttodirectory("$7z\7z.zip","$7z")
            del .\7z.zip
        }
        finally { pop-location }
    }

    if ($path.endswith('.tar.gz') -or $path.endswith('.tgz')) {
        # This is some crazy s**t right here
        $x = "cmd"
        $y = "/C `"^`"$7z\7za.exe^`" x ^`"$path^`" -so | ^`"$7z\7za.exe^`" x -y -si -ttar -o^`"$to^`""
        & $x $y
    } else {
        & "$7z\7za.exe" x $path -y -o"$to"
    }
}

By following these steps, you should now be able to extract GZ files in whatever manner you find useful.

Let us know which of the methods described above was more useful to you, by leaving your feedback in the comments section below.

idee restoro Still having issues? Fix them with this tool:
  1. Download this PC Repair Tool rated Great on TrustPilot.com (download starts on this page).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues with Patented Technologies (Exclusive Discount for our readers).

Restoro has been downloaded by 0 readers this month.

This article covers:Topics: