How to Open tar.gz Files in Windows 10 and 11

A .tar.gz (or .tgz) file is a compressed archive common on Linux and macOS, used for software source code, backups, and data sets. It’s two formats in one: a .tar archive that bundles files together, compressed with gzip. Windows can open these without extra software: Windows 11 handles them right in File Explorer, and both Windows 10 and 11 include a built-in tar command. This guide covers those options plus 7-Zip.

Quick Answer

Windows 11 (recent versions): Right-click the .tar.gz file and choose Extract All. Windows 10 or 11: Open Command Prompt in the file’s folder and run tar -xzf filename.tar.gz. Any version: Install 7-Zip and use 7-Zip > Extract Here (twice: once for .gz, once for .tar).

Command Prompt using the built-in tar command to list and extract a tar.gz archive into a folder
The built-in tar command can list (-tzf) and extract (-xzf) a .tar.gz file. Here it extracts into a folder named project.

Method 1: File Explorer (Windows 11)

Windows 11 version 23H2 and later can open .tar, .tar.gz, .7z, .rar, and other archive formats natively.

  1. Right-click the .tar.gz file and choose Extract All.
  2. Choose a destination and click Extract.

You can also double-click the file to browse its contents. If you don’t see these options, update Windows or use Method 2.

Method 2: Built-In tar Command (Windows 10 and 11)

Windows 10 version 1803 and later include tar.

  1. Open the folder containing the file in File Explorer.
  2. Click the address bar, type cmd, and press Enter. Command Prompt opens in that folder.
  3. To extract into the current folder, run:
    tar -xzf filename.tar.gz
  4. To extract into a specific folder (which must exist), run:
    tar -xzf filename.tar.gz -C C:\path\to\folder

What the letters mean: x = extract, z = gzip, f = file. Use tar -tzf filename.tar.gz to list the contents without extracting, and add v (tar -xvzf) to see each file as it’s extracted. For .tar.bz2 files, use -xjf; for plain .tar, use -xf.

Method 3: 7-Zip (Free)

  1. Install 7-Zip from 7-zip.org.
  2. Right-click the .tar.gz file and choose 7-Zip > Extract Here. This produces a .tar file.
  3. Right-click the .tar file and choose 7-Zip > Extract Here (or Extract to “folder\”) to get the files.

You can also open the .tar.gz in 7-Zip’s window and double-click through to the files inside.

Method 4: WSL (For Linux Users)

If you have the Windows Subsystem for Linux installed, open your Linux terminal and run tar -xzf /mnt/c/Users/YourName/Downloads/filename.tar.gz. This preserves Linux file permissions and symbolic links, which matters for some software packages.

Create a .tar.gz on Windows

To compress a folder: tar -czf archive.tar.gz foldername. Windows 11’s File Explorer can also create archives in several formats via right-click > Compress to on recent versions.

Troubleshooting

  • “tar is not recognized”: Your Windows 10 version is older than 1803. Update Windows or use 7-Zip.
  • “Cannot open: No such file”: Check the file name (use Tab to autocomplete) and put names with spaces in quotes.
  • Errors about symbolic links: Some archives contain Linux-specific links that Windows can’t create. Use WSL or ignore them if the files you need extract fine.
  • Only a .tar file after extracting: That’s normal in 7-Zip. Extract the .tar file too.

Summary

  1. Windows 11: right-click the file and choose Extract All.
  2. Windows 10 or 11: run tar -xzf filename.tar.gz in Command Prompt.
  3. Or use 7-Zip and extract twice.