How to Extract Files from a TAR Archive on macOS
TAR is a Unix staple for bundling files together. While TAR itself doesn't compress data, it's almost always paired with a compression algorithm (gzip, bzip2, xz) to create .tar.gz, .tar.bz2, or .tar.xz files. macOS supports TAR natively through Terminal.
The default way to open TAR files on macOS
Tool: Terminal (built-in)
$ tar xf archive.tarSteps
- Open Terminal.
- Navigate to the folder containing the .tar file.
- Run: tar xf archive.tar
- For compressed variants: tar xzf archive.tar.gz, tar xjf archive.tar.bz2, or tar xJf archive.tar.xz
Extract individual files from a TAR archive
While the default macOS tools support selective extraction, the process typically involves Terminal commands. MacPacker makes this effortless with a visual file browser — just browse the archive contents and drag out what you need.
A better way: open TAR files with MacPacker
MacPacker is a free, open-source macOS archive manager that supports TAR and 30+ other formats. Unlike the default tools, MacPacker lets you:
- Browse archive contents like a folder
- Preview files with Quick Look without extracting
- Extract individual files via drag and drop
- Navigate nested archives (archives within archives)
- Enjoy a native SwiftUI interface that feels right at home on macOS
Get MacPacker
v0.15.1 · macOS 14+$ brew install --cask macpackerApp Store updates may lag a few days behind direct downloads due to Apple review.
Frequently asked questions
How do I extract a TAR file on Mac?
Open Terminal and run: tar xf archive.tar — this extracts all files into the current directory. For .tar.gz files, use: tar xzf archive.tar.gz
Can I preview the contents of a TAR file without extracting?
In Terminal, run: tar tf archive.tar to list all files. For a visual file browser with Quick Look support, use MacPacker — it lets you navigate the archive like a folder.
Can I extract a single file from a TAR archive on Mac?
Yes. In Terminal, run: tar xf archive.tar path/to/file — this extracts only the specified file. MacPacker also supports selective extraction via drag and drop.
Related formats
Gzip is the most common compression format on Unix/macOS. Usually wraps a TAR archive to create .tar.gz files. Natively supported on macOS.
Bzip2 offers better compression than Gzip at the cost of speed. Common for source code distributions and Linux packages.
XZ uses LZMA2 compression for excellent compression ratios. Common in Linux distributions and large software packages.
TAR.Z is a TAR archive compressed with the original Unix compress utility. Found in legacy Unix archives.