file in abyss
Back to formats

Archive

TAR Tape Archive

Tape Archive is a archive format commonly identified by .tar. Use the listed signatures, MIME types, and structure notes to validate files beyond the extension.

Extensions .tar
MIME application/x-tar

Magic numbers

Analyze your file
offset 257 Tape Archive signature at byte offset 257
75 73 74 61 72
ustar

Structure

  1. File header block
  2. File data blocks
  3. Padding
  4. Zero blocks

Caveats

  • Do not trust the extension alone. Check the MIME type, the first bytes such as 75 73 74 61 72, and format-specific structure when possible.
  • Container formats and damaged files can share the same opening bytes, so deeper validation may be required for production upload, preview, or conversion flows.

Detection example

SIGNATURE = bytes.fromhex("7573746172")
OFFSET = 257

def is_tar(path: str) -> bool:
    with open(path, "rb") as f:
        f.seek(OFFSET)
        head = f.read(len(SIGNATURE))
    return head == SIGNATURE

Practical usage

Use cases

Tape Archive is used for compression, extraction, backups, attachments, and multi-file inspection. Validate paths, file counts, compressed size, and extracted size before unpacking.

Common detection mistakes

  • The .tar extension alone does not prove the file contents. Upload and conversion flows should combine extension, MIME type, leading bytes, and format-specific structure checks.
  • Tape Archive can start with signatures such as 75 73 74 61 72, but related containers and damaged files may require additional validation.

Security notes

Archives can contain zip-slip paths, excessive expansion, hidden files, and double extensions. Normalize extraction paths and enforce file count and size limits.

Using samples

11 samples help test leading-byte detection, parser errors, upload limits, and download behavior.

Sample files

11 / 11 files
Sample Traits Size Source / license / SHA-256
Arc

Two File TAR

Two File TAR is a Tape Archive sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.

two-files.tar
Type Sample
3.0 KB
Generated CC0 1.0
SHA-256 37ae9233002d2f15ba4b05db98f61bb016cd9ccfba2e29832b798c8fc7ddede5
Download
Arc

Blue Sky TAR

Blue Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

01-blue-sky.tar
Type Sample
3.0 KB
SHA-256 4f2498abfbfb9ee74180bf3a02b3a8f976fd16dc33c134c4c307529d46665609
Download
Arc

Flower Garden TAR

Flower Garden TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

02-flower-garden.tar
Type Sample
4.0 KB
SHA-256 ff19afd6572cafd772d5a916145fac852e97180fd8b2c0ab8b2bd05509c82a55
Download
Arc

Navy Blue Sky TAR

Navy Blue Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

03-navy-blue-sky.tar
Type Sample
5.5 KB
SHA-256 033cb4ba37d05f5256393369723ef400609baca455d8a72d53c145097a4e7c2c
Download
Arc

Nature of the Sky TAR

Nature of the Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

04-nature-sky.tar
Type Sample
6.5 KB
SHA-256 248e75969993dea282935a0309e494434cc97dfaa6b088cf22e216319771a9dd
Download
Arc

Sky Landscape TAR

Sky Landscape TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

05-sky-landscape.tar
Type Sample
7.5 KB
SHA-256 37f26144c9d8cab02adcce041bc704ca1c62f8dfbf371cfc4f36a16c73e7b8cc
Download
Arc

Starry Sky TAR

Starry Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

06-starry-sky.tar
Type Sample
8.5 KB
SHA-256 f6a45473e6b56103b67b0dd72518b907b4c1c1cb2ab885e484625000a655118a
Download
Arc

Blue Night Sky TAR

Blue Night Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

07-blue-night-sky.tar
Type Sample
9.5 KB
SHA-256 c4a343ba04c0a27cd56fa9d5da7acfda7bd6165e1f68b9921f7aabaa45729030
Download
Arc

Hibiscus Flower TAR

Hibiscus Flower TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

08-hibiscus-flower.tar
Type Sample
12 KB
SHA-256 0b5000a03369440888b0a8af7bf783f0b349ccc83a44e48c5a1c76f7ca9d513a
Download
Arc

Arctic Sky TAR

Arctic Sky TAR is a Tape Archive sample based on Wikimedia Commons. It can be used to test downloads, parsers, previews, and file type detection.

09-arctic-sky.tar
Type Sample
12 KB
SHA-256 bff79945ec6c8e58b31a7dc7061bd11ca8eca8b8c11f90920c8c4dfc9fdacc17
Download
Arc

NASA Blue Marble TAR

NASA Blue Marble TAR is a Tape Archive sample based on NASA Image and Video Library. It can be used to test downloads, parsers, previews, and file type detection.

nasa-blue-marble-2012-east.tar
Type Sample
19 KB
SHA-256 5314e1c9674de2f0f3f14d952c33991501d04c902b6f5fa22dc70760bac6da35
Download

Frequently asked questions

What is the magic number (file signature) of Tape Archive?

Tape Archive files begin with the byte signature 75 73 74 61 72 ("ustar"). Detect the format by reading these leading bytes rather than trusting the file extension alone.

What is the MIME type of Tape Archive?

The MIME type for Tape Archive is application/x-tar.

What file extension does Tape Archive use?

Tape Archive files use the .tar extension. The extension is a convention only and does not guarantee the file contents, so combine it with signature and structure checks.

Related formats