How to Extract a Gz File

Two Methods:WindowsMac OS X

"Gz" is a compressed file extension. It stands for "GNU Zip," after the GNU operating system. It was adopted by the GNU project, and is a popular compression format on the Internet.

You can unzip .gz files in Windows XP, Vista, 7, and Mac OS X by using unzipping software that supports the file extension. The following guide shows you how to view and extract a .gz file on Windows and Mac OS X systems.

Method 1

  1. Image titled Extract a Gz File Step 1
    Download and install unzipping software. You should find software that supports extensions not commonly supported by native extraction functions found on Windows XP, Vista, or Windows 7. These extensions typically include .gz, .tar, tar.gz, .tgz, and .rar.
  2. Image titled Extract a Gz File Step 2
    Locate the file using the unzipping software. Find the .gz file you wish to extract in the unzipping program's browser.
    • 7-zip is a popular application that will extract all the listed file types, and is free.
  3. Image titled Extract a Gz File Step 3
    Extract the file. Highlight the .gz file you want to extract and select the extract function built-in to your unzipping software.

Method 2
Mac OS X

  1. Image titled 1400790 4 1
    Double-click on the file. Mac OS X will unpack a .gz, .tar, .tar.gz, or a .zip file automatically.
  2. Image titled 1400790 5 1
    Alternately, use Terminal. In your Utilities folder, find the Terminal application and launch it.
    • Change the directory to where your .gz file currently resides. If you saved it to the Desktop, for example, enter at the [] cursor: cd /Users/Yourname/Desktop. Terminal should respond by creating a new line that says Macintosh:Desktop Yourname$ []
    • Enter gunzip -d and the name of the file, including the extension. This will extract and overwrite the .gz file, so consider making a copy of the compressed file before unzipping.
      • Note: there are other commands in addition to -d that you can use. They are listed below in Tips.
  3. Image titled 1400790 6 1
    Download a utility. There are many free or inexpensive utilities for the Mac. We'll use GUI Tar as an example.
    • Download GUI Tar from GUI Tar Extractor makes it easy to uncompress and extract files from archives. The following files can be opened by Extractor: .7z, .tar, .tgz, .tar.gz, .dmg.gz, .svgz, .gz, .tar.z, .z, .Z, .tar.Z, .taz, .tbz, .tbz2, .bz, .bz2, .rar, and .zip.
    • Launch the GUI Tar application, and press the Extractor button
    • Select your file, and click Extract. Your file will be extracted into the same folder as the original file, deleting the .gz file.


  • -L, --license display software license
  • -n, --no-name do not save or restore the original name and time stamp
  • -d, --decompress decompress
  • The file extension ".tar.gz" describes a Unix tape archive file that has been GNU zipped. It is an extension commonly used for backup data in Linux and Unix systems.
  • -N, --name save or restore the original name and time stamp
  • -h, --help give this help
  • -S, --suffix=SUF use suffix SUF on compressed files
  • -f, --force force overwrite of output file and compress links
  • -c, --stdout write on standard output, keep original files unchanged
  • -l, --list list compressed file contents
  • Unzipping software capable of extracting .gz files on Windows systems includes WinZip, 7-Zip, Bit Zipper 2010, and PowerArchiver. Stuffit can be used on Mac OS X systems.
  • -q, --quiet suppress all warnings
  • -r, --recursive operate recursively on directories
  • -t, --test test compressed file integrity
  • -v, --verbose verbose mode
  • -V, --version display version number
  • -1, --fast compress faster
  • -9, --best compress better

Article Info

Categories: File Manipulation