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

Teodor Nechita
by Teodor Nechita
Author
0 Comments
Download PDF
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?

1. Use a dedicated third-party decompression tool

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 Visit website

 

2. How can I unzip a GZ file using a Command-Line?

  1. Press Start
  2. Type in cmd, and open the Command Prompt with Administrator rights
  3. Type in the following command, and then press Enter to initialize it:

tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION


3. 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.

Was this page helpful?
Thanks for letting us know! You can also help us by leaving a review on MyWOT or Trustpillot.
Get the most from your tech with our daily tips
Tell us why!