FormatDrop
Document Format

TAR

Tape Archive

TAR (Tape Archive) is an archive format originally designed for backing up files to magnetic tape drives on Unix systems. Unlike ZIP, TAR does not compress files by itself — it simply bundles multiple files and directories into a single archive while preserving Unix file permissions, ownership, and symbolic links. Compression is applied separately using gzip (.tar.gz or .tgz), bzip2 (.tar.bz2), or xz (.tar.xz). TAR is the standard archive format for Linux and macOS software distribution.

What is TAR?

A TAR file is created by the `tar` command-line utility, which concatenates files into a single stream with headers describing each file's metadata (name, size, permissions, owner, timestamps). The resulting .tar file can be read sequentially — each file follows the last. When combined with gzip compression (producing .tar.gz), the entire archive is compressed as one stream, which is more efficient than compressing files individually as ZIP does. This makes .tar.gz the standard format for open-source project releases, Linux package source code, and server deployment artifacts.

TAR pros and cons

Advantages

  • Preserves Unix file permissions, symlinks, and ownership — ZIP does not
  • Better compression when paired with gzip/bzip2/xz (compresses as one stream)
  • Native support in every Linux/macOS terminal via the `tar` command
  • Standard for open-source releases, Docker layers, and server deployments
  • No file count or size limits for practical use

Limitations

  • No random access — must decompress from the beginning to reach a specific file
  • No built-in compression (compression is a separate step)
  • Windows does not open .tar.gz natively in older versions (needs 7-Zip or WSL)
  • Harder to update — adding or removing files requires re-creating the archive
  • Sequential nature makes it impractical for archives requiring frequent partial access

When should you convert TAR files?

Convert to TAR (.tar.gz) when deploying to Linux servers, distributing open-source software, creating Docker build contexts, or sharing files with Unix/macOS users who need permissions preserved. Convert FROM TAR to ZIP when sharing with Windows users who don't have 7-Zip installed, or when the recipient needs random access to individual files without decompressing the entire archive.

All FormatDrop conversions run entirely in your browser — no file upload, no server processing. Your files stay on your device.

TAR FAQ

What is the difference between .tar, .tar.gz, .tgz, and .tar.bz2?
.tar is an uncompressed archive — files bundled together with no compression. .tar.gz (also called .tgz) is a TAR archive compressed with gzip — the most common format for Linux distribution. .tar.bz2 is a TAR archive compressed with bzip2 — better compression but slower. .tar.xz is a TAR archive compressed with xz — best compression. For everyday use, .tar.gz is the right choice.
How do I create a .tar.gz file?
Run: `tar -czf archive.tar.gz folder/` to create a compressed TAR of a folder. To create from multiple files: `tar -czf archive.tar.gz file1.txt file2.txt folder/`. The flags: `-c` = create, `-z` = gzip compress, `-f` = filename. To extract: `tar -xzf archive.tar.gz` (`-x` = extract, `-z` = decompress gzip, `-f` = filename).
Can I open TAR files on Windows?
Windows 11 and Windows 10 (recent builds) can open .tar files natively in File Explorer. For .tar.gz, .tar.bz2, and .tar.xz, you need 7-Zip (free, 7-zip.org) or WinRAR. Windows Subsystem for Linux (WSL) also provides the full `tar` command if you have WSL installed. macOS opens .tar.gz natively by double-clicking (Archive Utility) or with `tar -xzf` in Terminal.