What is TAR?

Discover what TAR files are, their uses, and how they differ from other formats in this complete guide. Learn about the TAR format today.

Free online file converter tool. Works in Chrome Firefox Safari Edge Opera and other modern browsers on Windows macOS Linux Android and iOS. No software installation or sign-up required. All conversions run directly in your browser, so your files never leave your device. Free to use with no account needed.

TAR

What is TAR?

Complete guide to the TAR file format

Last updated:

Created1979
TypeArchive
Common UseUnix file packaging

What is TAR?

TAR (Tape Archive) is a file packaging format originating from Unix in the late 1970s. The name refers to its original purpose: archiving files to magnetic tape drives for backup. TAR bundles multiple files and directories into a single archive file while preserving file system metadata including file permissions, ownership, timestamps, hard links, and symbolic links - attributes that are essential in Unix and Linux environments but which ZIP archives do not reliably preserve.

A plain TAR file does not compress data - it only bundles files together, similar to how you might rubber-band a stack of papers. Compression is applied on top of the TAR archive using separate tools: gzip creates .tar.gz, bzip2 creates .tar.bz2, and xz creates .tar.xz. This separation of concerns (packaging vs. compression) is a Unix design philosophy. TAR archives are the universal distribution format for Linux software source code and system backups.

How TAR Works

A TAR archive is a flat concatenation of records: each archived file is preceded by a 512-byte header block describing its name, size, permissions, and ownership, followed by the file's contents padded to a multiple of 512 bytes.[2] Because there is no central index, tar streams sequentially, which suits its tape origins but means readers must scan the whole archive to list or extract a specific member.[3] The archive ends with two consecutive zero-filled blocks marking end-of-file.[2]

History and Standardization

tar first appeared in Version 7 Unix in 1979 and was later standardized by POSIX, producing the ustar format that most modern tools read.[1] Because the original 512-byte header limited field sizes, extensions such as GNU tar and POSIX pax were introduced to support long file names, large files, and extended attributes beyond the historic limits.[2] These competing extensions mean a few exotic archives may not be fully portable between every implementation.[3]

Technical Details

OriginUnix, AT&T Bell Labs, late 1970s[1]
File Extension.tar[1]
MIME Typeapplication/x-tar[1]
CompressionNone (packaging only)[1]
Metadata PreservedPermissions, ownership, timestamps, symlinks, hard links[1]
Common Variants.tar.gz, .tgz, .tar.bz2, .tar.xz[1]
Toolstar command, GNU tar, 7-Zip, WinRAR[1]

TAR vs Other Archive Formats

FeatureTARZIP
RoleBundling only[3]Bundle + compress
Built-in compressionNone[1]DEFLATE
Unix metadataPreserved[2]Limited
Per-file accessSequentialRandom
Best forUnix archiving pipelinesCross-platform sharing

TAR only bundles files and is usually paired with gzip or xz, whereas ZIP bundles and compresses in a single step.

Pros and Cons

Advantages

Unix Metadata Preservation

Preserves file permissions, ownership, and symbolic links that are lost in ZIP and other Windows-centric formats.

Universal on Unix/Linux

The tar command is installed on every Unix, Linux, and macOS system by default.

Streaming Support

TAR archives can be streamed directly through pipes, enabling network backup and compression without temporary files.

Flexible Compression Pairing

Pair with any compression tool (gzip, bzip2, xz, zstd) to get the exact speed-to-compression trade-off you need.

Disadvantages

No Built-in Compression

A plain .tar file is often larger than the original files because it adds header overhead without reducing data size.

No Random Access

Extracting a single file from a TAR archive requires reading through the entire archive sequentially.

Limited Windows Support

TAR is not natively supported on Windows outside of WSL and PowerShell, requiring third-party tools like 7-Zip.

Concatenation Behavior

Appending to a TAR archive adds duplicate entries for updated files rather than replacing them, which can cause confusion.

When to Use TAR

Here are the most common situations where TAR is the right choice:

Linux Software Distribution

Open-source software releases are distributed as tar.gz or tar.xz source packages for compilation.

System Backup

Use tar to create complete backups of Linux filesystem directories including all permissions and ownership metadata.

Docker Image Exports

Docker exports container images as TAR archives using docker save.

Data Transfer Between Unix Systems

TAR is the standard way to package files for transfer between Unix/Linux systems without losing filesystem attributes.

Convert TAR Files

Need to convert your TAR files? Use our free online converter.

Try Archive Converter Free

Frequently Asked Questions about TAR

Does TAR compress files?

No. A plain TAR file does not compress data - it only bundles files together. To compress, combine TAR with gzip (tar.gz), bzip2 (tar.bz2), or xz (tar.xz).

How do I create a tar.gz file?

Use: tar -czf archive.tar.gz directory/ - The -c flag creates, -z applies gzip compression, and -f specifies the output filename.

How do I extract a TAR file?

Use: tar -xf archive.tar - For compressed variants: tar -xzf archive.tar.gz (gzip) or tar -xJf archive.tar.xz (xz).

Can I open TAR files on Windows?

7-Zip, WinRAR, and the built-in Windows 11 tar command can open TAR files on Windows. The Windows Subsystem for Linux (WSL) also provides native tar support.

What is the difference between TAR and ZIP?

TAR is a packaging format from Unix that preserves file permissions and metadata; ZIP is a combined packaging and compression format from Windows. TAR is compressed separately; ZIP compresses each file individually. TAR is standard on Linux; ZIP is standard on Windows.

References

  1. TAR archive format - Library of Congress
  2. GNU tar Manual - GNU Project
  3. tar (computing) - Wikipedia