How to Extract Files from a GZ (Gzip) Archive on macOS
GZ (Gzip) is the standard compression format in the Unix world. On macOS, you'll most often encounter it as .tar.gz or .tgz files — a TAR archive compressed with Gzip. macOS handles Gzip natively through both Archive Utility and Terminal.
The default way to open GZ files on macOS
Tool: Terminal (built-in)
$ gunzip file.gzSteps
- For standalone .gz files: gunzip file.gz (decompresses in place).
- For .tar.gz archives: tar xzf archive.tar.gz
- Double-clicking a .tar.gz in Finder will also extract it via Archive Utility.
Extract individual files from a GZ archive
The default macOS tools extract everything — there's no way to pick individual files. MacPacker lets you browse GZ archive contents, preview files, and extract only what you need — without unpacking the entire archive.
A better way: open GZ files with MacPacker
MacPacker is a free, open-source macOS archive manager that supports GZ 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 .gz file on Mac?
For a standalone .gz file, open Terminal and run: gunzip file.gz. For .tar.gz archives, run: tar xzf archive.tar.gz. You can also double-click .tar.gz files in Finder.
Can I extract specific files from a .tar.gz archive?
Yes. In Terminal: tar xzf archive.tar.gz path/to/file. With MacPacker, browse the archive visually and drag out individual files.
Related formats
TAR (tape archive) bundles files without compression. Often combined with GZ, BZ2, or XZ for compressed archives. Natively supported via Terminal 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.