What Is a .TAR File?
A .tar file is a tape archive, a Unix format that bundles many files and folders into one file while preserving names, permissions and timestamps. Plain TAR does not compress; it is usually combined with gzip, bzip2 or xz to make .tar.gz, .tar.bz2 or .tar.xz files. macOS, Linux and Windows 10 and 11 include a tar tool.
- Extension
- .tar
- Full name
- Tape Archive
- Type
- Archive file
- MIME type
- application/x-tar
- Developed by
- Unix (standardized in POSIX)
About TAR files
TAR dates from early Unix, when backups were written to magnetic tape. A TAR file is simply each file's header, describing name, size, owner, permissions and modification time, followed by its contents, one after another. Because it records Unix permissions and symbolic links, it is the standard way to package source code, server backups and software for Linux and macOS.
TAR does no compression by itself, so a .tar file is about the same size as its contents. Compression is applied on top: tar.gz with gzip is the most common, tar.xz gives smaller results, and tar.bz2 sits in between. Compressing the whole archive as one stream often beats ZIP, which compresses each file separately.
The downside is random access. To pull one file out of a compressed TAR, the tool has to read through the stream until it reaches that file, which is slow for large archives. On Windows, file permissions and symlinks stored in a TAR may not translate cleanly, which matters mostly for developers.
What TAR files are used for
- Distributing source code and Linux software
- Server and website backups
- Docker image exports and container layers
- Moving folders between Linux and Mac machines with permissions intact
How to open a .tar file
Mac
Double-click and Archive Utility extracts it. In Terminal, tar -xf file.tar does the same.
Windows
Windows 11 File Explorer opens TAR archives directly. On Windows 10, run tar -xf file.tar in Command Prompt or use 7-Zip.
Linux
Run tar -xf file.tar, or double-click to open it in your desktop archive manager.
Android
Use an archive app such as ZArchiver; Files by Google does not extract TAR.
How to convert a .tar file
To compress a TAR, run gzip file.tar (producing file.tar.gz) or xz file.tar on Mac or Linux, or use 7-Zip on Windows.
To convert TAR to ZIP, extract it and compress the folder as ZIP with File Explorer, Finder or 7-Zip.
On Windows 11 version 24H2 or later you can create TAR directly with Compress to > TAR File.
Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.
Naming and renaming TAR files
- Include the project and version in software archives (myapp-1.4.2.tar) following the long-standing open-source convention that tools and package managers expect.
- Keep the full double extension (.tar.gz, .tar.xz) when compressing so people know they need to decompress and then unpack.
- For backups, put the hostname and an ISO date in the name (web01-backup-2025-08-01.tar) so restores are unambiguous.
Renaming lots of .tar files? Use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.
Related file types
A .gz file is a single file compressed with gzip, the GNU compression tool. Most often you will see .tar.gz or .tgz, which is a TAR archive of many files compressed with gzip, the standard way to distribute Linux and open-source software. macOS, Linux and Windows 11 can extract them without extra software.
A .zip file is a compressed archive that bundles one or more files and folders into a single, smaller file. It uses lossless compression, so everything comes back exactly as it was when you extract it. Windows, macOS, iPhone, Android and Chromebooks all open ZIP files without installing anything.
A .7z file is a compressed archive created with 7-Zip, the free and open-source archiver by Igor Pavlov. It uses LZMA or LZMA2 compression, which usually produces smaller archives than ZIP, and supports AES-256 encryption including hidden file names. Windows 11 opens and creates 7z natively; Macs need a free app.
A .rar file is a compressed archive in the proprietary RAR format created by Eugene Roshal and used by WinRAR. Like ZIP, it bundles files into one smaller package, but adds strong AES-256 encryption, recovery records and easy multi-part splitting. Windows 11 can now extract RAR files natively; creating them still needs WinRAR.
Frequently Asked Questions
How do I open a .tar file on Windows?
On Windows 11, double-click it in File Explorer. On Windows 10, run tar -xf filename.tar in Command Prompt, or use 7-Zip.
Is a TAR file compressed?
No. Plain .tar only bundles files. Compressed versions use an extra extension such as .tar.gz, .tgz or .tar.xz.
What is the difference between TAR and ZIP?
ZIP compresses each file and is native on every OS; TAR bundles files and preserves Unix permissions, leaving compression to gzip or xz.