How to extract .tar.gz files on Windows 11

If you come across a .tar.gz, .tgz, or .gz file, you can use these steps to use the tar command-line tool to extract its content on Windows 11.

Windows 11 extract .tar.gz
Windows 11 extract .tar.gz

Windows 11 includes native support to extract “.tar.gz” files using Command Prompt without needing third-party tools. You can even use a Linux distro through the Windows Subsystem for Linux (WSL) to quickly extract tarballs created on another platform.

When you see a .tar.gz file, it means that this is a file created using the Unix-based archival application tar and then compressed using gzip compression. These files are often referred to as “tarballs.” While you can find them written like a double extension (.tar.gz), the format can also be written as .tgz or .gz. (It is worth noting that Linux doesn’t use file extensions. Instead, the file type is part of the file name.)

Although tar files are usually more common on Linux distros (for example, Ubuntu) and macOS for backups and archival, you may also come across these files on Windows 11. You could use third-party tools like 7-Zip and PeaZip, but these are not recommended as they don’t always work to extra .tar.gz files. Instead, you should be using the native tar support available on Windows 11 or a Linux distro in WSL.

In this guide, you will learn the steps to use native tar commands on Windows 11 using Command Prompt and Ubuntu to extract the content of a .tar.gz file.

Extract .tar.gz, .tgz, .gz tarballs on Windows 11 using tar

To extract .tar.gz, .tgz, .gz, and .zip files using tar on Windows 11, use these steps:

  1. Open Start on Windows 11.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to use tar to extract the files and press Enter:


    Windows 11 extract tar

    In the command, change the command to include the source and destination paths.

Once you complete the steps, the files and folders will extract to the specified destination.

It is assumed the tarball was created on another system. Also, we skipped some options that are usually useful to preserve permissions since they are not required on  Windows 11. 

Extract .tar.gz, .tgz, .gz tarballs on Windows 11 using Linux tar

You first have to install a distro using the Windows Subsystem for Linux before you can extract tarballs on Linux.

To extract a .tar.gz file using Linux, use these steps:

  1. Open Start.

  2. Search for Ubuntu and click the top result to open the app.

  3. Type the following command to extract the content of the .tar.gz file and press Enter:

    sudo tar -xvzf /mnt/c/PATH/TO/TAR-FILE/Desktop/FILE-NAME.tar.gz -C /mnt/c/PATH/TO/DESTINATION/FOLDER

    Linux extract tar on Windows 11

    In the command, change the syntax to include the source and destination paths. If it’s only a .tar file, use the same command but omit the z argument.

We used the sudo command to run the tool as an administrator, tar to call the application, and we use these options:

  • x — instructs tar you want to extract content.
  • v — optional argument to display the extraction process. Otherwise, you will only see a blinking cursor until the process is complete.
  • z — tells tar to uncompress the content of a “.tar.gz” file with gzip.
  • f — instructs tarball the name of the file to extract.

After the option, you have to specify the path of the tarball file to extract. In the command, we start the path with /mnt/c/ since this is Linux, not Windows.

The -C — (hyphen and capital C) option is used to change folders, and you have to specify the destination path, which starts with the /mnt/ annotation followed by the Windows path.

You must pay attention to uppercase and lowercase while typing a Linux command since “Desktop” is not the same as “desktop.”

These are the basic options to extract a “.tar.gz” file, but you can use the tar --help command to learn more about the available options.

It’s important to note that Microsoft is building native support for TAR, GZ, 7-Zip, RAR, and many other archival formats to File Explorer. The support is expected to arrive with the release of Windows 11 23H2.

About the author

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He's also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ & Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter), YouTube, and LinkedIn.