Free TAR sample files
The Unix archive format: files concatenated with headers, without compression. Download valid TAR test files in 5 exact sizes, from 10 KB to 10 MB, each with a checksum.
- Extension
- .tar
- MIME type
- application/x-tar
- Kind
- Binary
- Category
- Archives
TAR files by size
Every file below is a valid Tape archive file of exactly the stated size. Open a file's page for its checksum and contents. TAR files cannot be displayed by a browser, so their pages show the file's details instead of a preview.
| File | Size | Contents | Download |
|---|---|---|---|
| 10 KB TAR samplesample-tar-10kb.tar | 10 KB10,240 bytes | Entries: 2 (README.txt, payload.bin) | Download TAR |
| 100 KB TAR samplesample-tar-100kb.tar | 100 KB102,400 bytes | Entries: 2 (README.txt, payload.bin) | Download TAR |
| 1 MB TAR samplesample-tar-1mb.tar | 1 MB1,048,576 bytes | Entries: 2 (README.txt, payload.bin) | Download TAR |
| 5 MB TAR samplesample-tar-5mb.tar | 5 MB5,242,880 bytes | Entries: 2 (README.txt, payload.bin) | Download TAR |
| 10 MB TAR samplesample-tar-10mb.tar | 10 MB10,485,760 bytes | Entries: 2 (README.txt, payload.bin) | Download TAR |
What is a TAR file?
A tar archive is a simple stream: a 512-byte header describing a file, then the file contents padded to a multiple of 512 bytes, repeated for each entry. It preserves Unix permissions and ownership.
Tar does not compress. It is normally combined with gzip, giving the familiar .tar.gz, or with other compressors.
How to recognise a TAR file
| Extension | .tar |
|---|---|
| MIME type | application/x-tar |
| Specification | POSIX ustar and pax |
| Block size | 512 bytes |
| Compression | None; usually wrapped in gzip, bzip2, xz or zstd |
| End marker | Two blocks of zero bytes |
What to test for
These are the behaviours that most often go wrong when software handles TAR files.
- Like ZIP, tar entries can contain absolute paths or "../", and can be symbolic links. Validate before extracting.
- There is no index, so listing the contents means reading the whole archive.
Strengths of TAR
- Preserves Unix permissions, ownership and symbolic links.
- A simple stream format that can be written and read without seeking.
Limitations of TAR
- No compression of its own and no index of contents.
- Not handled natively by older versions of Windows.
Typical uses of TAR test files
- Testing archive extraction on servers
- Checking backup and deployment tooling
- Testing container and package pipelines
Software that opens TAR
- tar on Linux, macOS and Windows
- 7-Zip and WinRAR
- Docker images and software source releases
Specifications
Related
TAR sample files: questions
- Why is there no 1 KB TAR sample?
- A tar archive is built from 512-byte blocks and ends with two empty blocks, so the smallest archive containing a README and a payload is larger than 1 KB.
- What is the MIME type of a TAR file?
- The MIME type is application/x-tar. The file extension is .tar.
- Is a sample TAR file the same as a dummy or example TAR file?
- Yes. Sample, test, dummy and example TAR files are different names for the same thing: a TAR file with known contents that stands in for a real one. Any file on this page will do wherever a tutorial or a test plan asks for a dummy TAR file.