How to Open and Create tar Files on Windows

Menu showing the creation of tar files on Windows 10

Although .zip is the primary archive format you’ll find on Windows, you may occasionally run into a .tar, .tar.gz, or other similar file that you need to open. These tar files (frequently referred to as “tarballs”) are much more common on Linux operating systems, but you can open and create them on Windows as well.

Tar files are just files that hold more files, akin to the .zip files you’ve probably seen and used before. Tar files with the .tar extension aren’t compressed, but files with a .tar.gz extension are using gzip compression and will results in a smaller file size. Some other tar formats you may see are .tar.bz2 and .tar.xz. All are using a different type of compression method, but they can all be opened on Windows if you follow our guide.

Related: How to Open and Create tar Files on Linux (with Commands and GUI)

Recommended software: 7-Zip

Windows doesn’t (yet) have a native way to open or create tar files, so you’ll need an extra program to do that. 7-Zip is a handy program that can pack and unpack tar files and a slew of other formats. It’s lightweight, free, and open-source. You can head over to their download page to start installing it.

Installation is quick and simple. This is the only prompt you’ll interact with when you open the installer:

7-Zip installation prompt

How to open tar files on Windows with 7-Zip

Once it’s done installing, you’ll be able to right-click on tar files and see the ‘7-Zip’ options in the right-click context menu. There are a few options in this menu, including opening the archive to browse the files inside, or extract the files to a specific location. If you’d just like to extract the files, you can extract them to a single folder in your current directory (the one where the tar file resides) by clicking ‘Extract to name-of-tar-file.’ Here’s what it looks like when we extract the contents of a file named MyFiles.tar:

7-Zip menu showing extract option

If you are opening a compressed tar file (one with a .gz or .bz2 or other extension), you’ll need to do one extra step. You have to decompress the tar file before being able to open it. So, in our MyFiles.tar.gz archive, you can see that 7-Zip first gives us the option to extract it into a base tar file: MyFiles.tar.

7-Zip menu showing extract option for .tar.gz file

Once the base tar file has been decompressed, you can extract its contents as shown above.

How to create tar files on Windows with 7-Zip

To create a tar file, you can highlight the files you’d like to archive, right-click, and go to 7-Zip > Add to archive.

Menu for adding files to an archive

In the ‘Add to Archive’ menu, just select ‘tar’ as your archive format and click OK.

Selecting the tar archive format in 7-Zip

You’ll notice that the compression level is automatically set to ‘store’ and can’t be changed. This means that it will archive your selected files as a .tar but will not compress them. If you’d like compression (appending a .gz, .bz2, or .xz file extension), you can right-click your tar file and click ‘Add to archive.’

Using 7-Zip to compress a tar file with gzip

Now, you’ll notice some new options under the ‘archive format’ selection, which weren’t there when creating your base .tar file.

Selecting compression for tar file

You’ll probably want to select gzip, which will create a .tar.gz file. It seems to be the most common type of tar archive, although bzip2 and xz compression are also popular choices for tar files. Even the 7z option, which will create a .tar.7z file, is becoming more widespread. If in doubt, just select gzip.

Leave a Reply

Your email address will not be published. Required fields are marked *