Archive formatsince 1979

.tarTape Archive

A Unix archive format for bundling files, often paired with gzip, bzip2, or xz compression.

Extensions
.tar, .tar.gz, .tgz, .tar.bz2, .tar.xz
MIME
application/x-tar, application/gzip, application/x-gtar
Standard
POSIX tar / pax archive family
Released
1979

About this format

TAR bundles files and directories into one stream. Compression is usually added separately, which is why .tar.gz and .tar.xz are common.

Use TAR for source releases, server backups, and Unix-friendly archives. Use ZIP when recipients are mostly non-technical desktop users.

Real-world samples & file sizes

Four real compressed tar archives from package registries and official source releases. Each preview is generated from the actual archive file list, so the cover reflects the downloaded tarball contents.

GNU hello Source TAR.GZ sample preview for 538 entries / tar.gz
source release538 entries / tar.gz

GNU hello Source TAR.GZ

A full GNU source release archive with build files, translations, and documentation.

1.11 MB gz.gz
GNU FTP · GPL-3.0-or-later
Lua 5.4.8 TAR.GZ sample preview for 78 entries / tar.gz
language source78 entries / tar.gz

Lua 5.4.8 TAR.GZ

A compact language source archive with C sources, headers, manuals, and docs.

366 KB gz.gz
Lua.org · MIT
is-number NPM TGZ sample preview for 4 entries / tgz
tiny package4 entries / tgz

is-number NPM TGZ

A very small npm tarball useful for checking package-root paths and metadata.

4 KB tgz.tgz
picocolors NPM TGZ sample preview for 7 entries / tgz
typed package7 entries / tgz

picocolors NPM TGZ

A small JavaScript package archive with browser, Node, and TypeScript definition files.

3 KB tgz.tgz

Pros

  • +Preserves Unix paths and metadata
  • +Excellent for source and server archives
  • +Streams well

Cons

  • Plain .tar is not compressed
  • Less familiar to casual users than ZIP
  • Windows users may need tools for some variants

TAR vs other formats

vsSizeQualityNote
ZIPDepends on compressionBoth archive filesZIP is simpler for casual cross-platform sharing.
7Z7Z often compresses smallerBoth preserve filesTAR is more Unix-native and stream-friendly.

Where it works

Operating systems
  • Unix/Linux native
  • macOS native
  • Windows 10/11 supports many archive operations
Browsers
  • Browsers download archives; extraction needs app logic
Apps
  • tar
  • bsdtar
  • 7-Zip
  • The Unarchiver
  • WinRAR

Frequently asked questions

Is TAR compressed?
Plain .tar is only a bundle. Compression is added by gzip, bzip2, xz, or another compressor.
Why use TAR for source code?
It preserves Unix-style directory trees and streams well in build and server workflows.

Sources

Other archive formats