A .tar.gz file, also known as a tarball, is a compressed archive used in UNIX and Linux systems. This format involves multiple files bundled into a single archive and compressed using
Although .tar.gz is commonly associated with UNIX and Linux distributions, you can also extract these files in Windows using various third-party tools.
This tutorial will show you how to extract .tar.gz files in a Windows environment.
- A Windows system (this tutorial uses Windows 11).
- WinRAR, WinZip, and 7-Zip installed (for specific examples).
- The tar tool (for some examples).
- Access to Command Prompt.
How to Extract .tar.gz File in Windows
Since Windows doesn't natively support .tar.gz files, extracting involves third-party tools or non-native commands. The following text outlines the process of extracting a .tar.gz file in a Windows environment.
Extract .tar.gz File in Windows Using tar Command
The command bundles multiple files and directories into a single file archive but doesn't compress data on its own. Therefore, it is often used with compression tools, such as
gzip (tar.gz files) or
bzip2 (tar.bz2 files), to reduce the overall archive size.
tar command is not a native Windows command. It usually doesn't come preinstalled in older Windows systems. However, newer versions (starting from Windows 10) have it preinstalled.
The following example shows how to extract a .tar.gzip file called archive_1 using the
tar command. The archive_1 consists of three files: sample_file1, sample_file2, and sample_file3.
To extract the files using
1. Open the Command Prompt.
2. Use the cd command to navigate to the directory the archive is in. In this case:
3. Use the following syntax to extract files:
tar -zxvf [archive_name.tar.gz]
This command consists of:
-z.Specifies the input is compressed with
-x. Stands for extract.
-v. Enables verbose mode to provide detailed output during extraction.
-f. Specifies the filename to be extracted.
For instance, in our case:
tar -zxvf archive.tar.gz
The output lists extracted files.
Note: Master the Command Prompt with our cmd commands guide which features a free downloadable cheat sheet.
Extract .tar.gz File in Windows Using 7-Zip
For a more GUI-friendly approach to extracting .tar.gz files, use 7-Zip.
Follow these steps to extract files from a .tar.gz archive:
1. Right-click the archive.
2. Find and hover over 7-Zip.
3. Choose Extract Here to extract files to the archive folder.
4. Alternatively, select Extract files to pick where to extract the files.
A new window opens to manage where and how to extract files.
Extract .tar.gz File in Windows Using WinRAR
Another way to access archive files is to extract them via WinRar. To accomplish this, follow these steps:
1. Right-click the archive.
2. Hover over the WinRar icon.
3. Choose Extract Here to extract the file to your current location.
Alternatively, select one of the offered locations or set one up by clicking the Extract files… option.
Extract .tar.gz File in Windows Using WinZip
Extracting .tar.gz files using WinZip is also quite straightforward.
To get the files, follow these steps:
1. Right-click the archive file and hover over WinZip.
2. Choose whether to unzip to one of the offered locations or define one with the Unzip to… option.
The Unzip to…option opens up another window with extra settings.
3. Select Unzip to start the process.
After reading this article, you know how to extract .tar.gz files in Windows using the
tar command, 7-Zip, WinZip, or WinRAR.
Next, learn how to extract .tar.gz files in Linux.