What Is a TAR File?

How to open, edit, create, and convert TAR files

What to Know

The article explains what TAR files are and how they're different from other archive formats, which programs can extract files from them, and how to convert one to similar archive formats.

What Is a TAR File?

Short for Tape Archive, and sometimes referred to as tarball, a file that has the TAR file extension is a file in the Consolidated Unix Archive format. A program or command that can open archives is needed to open a TAR file.

Because the TAR file format is used to store multiple files in one single file, it's a popular method for both archiving purposes and for sending multiple files over the internet, like for software downloads.

The TAR file format is common in Linux and Unix systems, but only for storing data, not compressing it. TAR files are often compressed after being created, but those become TGZ files, using the TGZ, TAR.GZ, or GZ extension.

TAR is also an acronym for technical assistant request, but it has nothing to do with the TAR file format.

How to Open a TAR File

TAR files, being a relatively common archive format, can be opened with most popular zip/unzip tools. PeaZip and 7-Zip are two of the better free file extractors that support both opening TAR files and creating TAR files, but check out this list of free file extractors for a number of other choices.

B1 Online Archiver and ezyZip are two other TAR openers, but they run in your browser instead of through a downloadable program. Just upload the TAR to one of these two websites to extract out the contents.

Unix systems can open TAR files without any external programs by using the following command, where file.tar is the name of the TAR file:

tar -xvf file.tar

How to Make a Compressed TAR File

What's been described on this page is just how to open, or extract files from a TAR archive. If you want to make your own TAR file from folders or files, the easiest way would be to use a graphical program like 7-Zip.

  1. Select all the files and folders you want in the TAR file.

  2. Right-click one of the highlighted items and select Add to archive.

  3. Choose tar from the Archive format drop-down menu.

    7-Zip TAR file creation process in Windows 10
  4. Select OK.

Another option, so long as you're on Linux, is to use a command-line command to build the TAR file. However, with this command, you'll also be compressing the TAR file, which will produce a TAR.GZ file.

This command will make a TAR.GZ file out of a folder or a single file, whichever you choose:

tar -czvf name-of-archive.tar.gz /path/to/folder-or-file

This is what this command is doing:

  • -c: Create an archive
  • -z: Use gzip to compress the archive
  • -v: Enable verbose mode to show the progress of the creation process
  • -f: Lets you specify the name of the archive

Here's an example if you want to "TAR a file" (make a TAR file) from a folder named /myfiles/ to make it called files.tar.gz:

tar -czvf files.tar.gz /usr/local/myfiles

How to Convert a TAR File

Zamzar and Online-Convert.com are two free file converters, both web services, that will convert a TAR file to ZIP, 7Z, TAR.BZ2, TAR.GZ, YZ1, LZH, or CAB. Most of these formats are actually compressed formats, which TAR is not, meaning that these services act to compress the TAR as well.

TAR conversion options at Zamzar

Keep in mind that if you use one of those online converters, you'll need to first upload the TAR file to one of those websites. If the file is large, you might be better off with a dedicated, offline converting tool.

All things considered, the best way to convert TAR to ISO would be to use the free AnyToISO program. It even works via the right-click context menu so you can just right-click the TAR file and then choose to convert it to an ISO file.

Considering that TAR files are single-file collections of multiple files, TAR to ISO conversions make the most sense since the ISO format is basically the same sort of file. ISO images, however, are much more common and supported than TAR, especially in Windows.

TAR files are just containers for other files, similar to folders. Therefore, you can't just convert a TAR file to CSV, PDF, or some other non-archive file format. To "convert" a TAR file to one of those formats really just means to extract the files out of the archive, which you can do with one of the file extractors mentioned above.

Is Your File Still Not Opening?

The simplest explanation for why your file doesn't open like described above is that it doesn't really end in the .TAR file extension. Double-check the suffix to be sure; some file extensions are spelled very similarly and it can be easy to mistake them for other file formats.

For example, a TAB file uses two of the three file extensions TAR has but is not related to the format at all. They're instead either Typinator Set, MapInfo TAB, Guitar Tablature, or Tab Separated Data files—each of those formats open with unique applications, none of which are file extraction tools like 7-Zip.

The best thing to do if you're dealing with a file that isn't a Tape Archive file is to research that specific file extension on Lifewire or elsewhere on the internet, and you should be able to find which applications are used to open or convert the file.

If you do have a TAR file but it doesn't open with the suggestions from above, it's likely that your file extractor doesn't recognize the format when you double-click it. If you're using 7-Zip, right-click the file, choose 7-Zip, and then either Open archive or Extract files.

  • How do you open a tar.gz file?

    On a Mac, open a tar.gz file by double-clicking on the file; the Mac's Archive Utility will extract and open the tar.gz file automatically. On Windows, you'll need an external program to open a tar.gz file, such as 7-ZIP (discussed above), which also opens TAR files.

  • How do I install a tar.gz file?

    If a tar.gz file is being used to distribute an application's source code or a binary file that executes a program, you'll install the tar.gz package. In Linux, extract the tar.gz package's content by entering tar xvf tarball.tar.gz into the command line. Enter the newly extracted directory and find the file with instructions for compiling and executing the program. It may be called Install or something similar. In some cases, you may find a Configure file, which you'll need to execute. Next, you'll build a package by entering the command make -arguments, which will yield an executable line. To execute the program, you'll install it with the command make install. Note that this process will vary depending on the type of executable file you're installing.

Was this page helpful?