A .tar.gz or .tgz file is a TAR archive compressed with gzip, the standard way to package source code, Linux software, datasets and server backups. Windows has gained support for it gradually, so the easiest method depends on your Windows version.
Option 1: File Explorer (recent Windows 11)
Windows 11 version 23H2 and later can open .tar, .tar.gz and .tgz files natively. Double-click the file to browse its contents, or right-click it and choose Extract All.... Very large archives can be slow this way; the tar command below is usually faster. Windows 10 and earlier Windows 11 versions cannot open these files in File Explorer.
Option 2: the built-in tar command (Windows 10 and 11)
Windows 10 version 1803 and later include tar.exe. Open Command Prompt or PowerShell in the folder that contains the archive (in File Explorer, type cmd in the address bar and press Enter), then run:
tar -xzf archive.tar.gzTo list the contents first, or to extract into a separate folder (which must already exist):
tar -tzf archive.tar.gz
mkdir extracted
tar -xzf archive.tar.gz -C extractedOption 3: 7-Zip
7-Zip treats .tar.gz as two layers. Right-click the file and choose 7-Zip > Extract Here (on Windows 11 it may be under Show more options) to get archive.tar, then do the same with the .tar to get the files. Alternatively, open the .tar.gz in 7-Zip File Manager and double-click the .tar inside.
Option 4: in your browser
Extract ZIP reads .tar, .tar.gz, .tgz and .gz files as well as ZIPs. Drop the archive in, browse the folder tree and download the files you need, without installing anything. The archive is processed locally in your browser and is not uploaded.
If you are passing the files on to Windows users who are not comfortable with TAR, convert them with TAR to ZIP. The resulting ZIP keeps folders and timestamps and opens with a double-click on any Windows version.
Problems you may hit on Windows
| Problem | Why it happens | Fix |
|---|---|---|
| Errors about invalid file names | Linux allows characters such as : ? * " < > | in names; Windows does not. Names like CON or aux.c are reserved too. | Extract with 7-Zip, which replaces invalid characters, or use WSL. |
| A file is missing or overwritten | Linux names are case-sensitive, so README and readme can sit side by side; on Windows they collide. | Extract into WSL or a case-sensitive folder, or rename one of the files. |
| Symbolic links fail or are missing | Creating symlinks on Windows needs Developer Mode or administrator rights. | Turn on Developer Mode, or ignore them if you do not need them. |
| Executable permissions are lost | Windows does not use Unix permissions. | Nothing to fix on Windows; keep the original .tar.gz if the files will go back to Linux. |
You get a .tar file instead of files | Only the gzip layer was removed. | Extract the .tar once more. |
The file is .tar.xz, .tar.bz2 or .tar.zst | A different compressor than gzip. | Open it with Extract TAR, which reads all of these; 7-Zip and recent Windows 11 versions also open several of them. |