What Is a .TAR File?

A .tar file is a tape archive, a Unix format that bundles many files and folders into one file while preserving names, permissions and timestamps. Plain TAR does not compress; it is usually combined with gzip, bzip2 or xz to make .tar.gz, .tar.bz2 or .tar.xz files. macOS, Linux and Windows 10 and 11 include a tar tool.

Extension
.tar
Full name
Tape Archive
Type
Archive file
MIME type
application/x-tar
Developed by
Unix (standardized in POSIX)

About TAR files

TAR dates from early Unix, when backups were written to magnetic tape. A TAR file is simply each file's header, describing name, size, owner, permissions and modification time, followed by its contents, one after another. Because it records Unix permissions and symbolic links, it is the standard way to package source code, server backups and software for Linux and macOS.

TAR does no compression by itself, so a .tar file is about the same size as its contents. Compression is applied on top: tar.gz with gzip is the most common, tar.xz gives smaller results, and tar.bz2 sits in between. Compressing the whole archive as one stream often beats ZIP, which compresses each file separately.

The downside is random access. To pull one file out of a compressed TAR, the tool has to read through the stream until it reaches that file, which is slow for large archives. On Windows, file permissions and symlinks stored in a TAR may not translate cleanly, which matters mostly for developers.

What TAR files are used for

  • Distributing source code and Linux software
  • Server and website backups
  • Docker image exports and container layers
  • Moving folders between Linux and Mac machines with permissions intact

How to open a .tar file

Mac

Double-click and Archive Utility extracts it. In Terminal, tar -xf file.tar does the same.

Windows

Windows 11 File Explorer opens TAR archives directly. On Windows 10, run tar -xf file.tar in Command Prompt or use 7-Zip.

Linux

Run tar -xf file.tar, or double-click to open it in your desktop archive manager.

Android

Use an archive app such as ZArchiver; Files by Google does not extract TAR.

How to convert a .tar file

To compress a TAR, run gzip file.tar (producing file.tar.gz) or xz file.tar on Mac or Linux, or use 7-Zip on Windows.

To convert TAR to ZIP, extract it and compress the folder as ZIP with File Explorer, Finder or 7-Zip.

On Windows 11 version 24H2 or later you can create TAR directly with Compress to > TAR File.

Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.

Naming and renaming TAR files

  • Include the project and version in software archives (myapp-1.4.2.tar) following the long-standing open-source convention that tools and package managers expect.
  • Keep the full double extension (.tar.gz, .tar.xz) when compressing so people know they need to decompress and then unpack.
  • For backups, put the hostname and an ISO date in the name (web01-backup-2025-08-01.tar) so restores are unambiguous.

Renaming lots of .tar files? Use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.

Related file types

Frequently Asked Questions

How do I open a .tar file on Windows?

On Windows 11, double-click it in File Explorer. On Windows 10, run tar -xf filename.tar in Command Prompt, or use 7-Zip.

Is a TAR file compressed?

No. Plain .tar only bundles files. Compressed versions use an extra extension such as .tar.gz, .tgz or .tar.xz.

What is the difference between TAR and ZIP?

ZIP compresses each file and is native on every OS; TAR bundles files and preserves Unix permissions, leaving compression to gzip or xz.

More archive file extensions · all file extensions