XAR.xar

How to Extract Files from a XAR Archive on macOS

XAR (eXtensible ARchive) is an archive format designed by Apple, used internally for macOS installer packages (.pkg files) and Xcode components. While you rarely encounter standalone .xar files, understanding the format helps when inspecting macOS packages.

The default way to open XAR files on macOS

Tool: Terminal (built-in)

$ xar -xf archive.xar

Steps

  1. Open Terminal.
  2. Run: xar -xf archive.xar
  3. To list contents: xar -tf archive.xar
Note: The xar command is available on macOS. It's the native tool for XAR archives.

Extract individual files from a XAR archive

The default macOS tools extract everything — there's no way to pick individual files. MacPacker lets you browse XAR archive contents, preview files, and extract only what you need — without unpacking the entire archive.

A better way: open XAR files with MacPacker

MacPacker is a free, open-source macOS archive manager that supports XAR 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 macpacker

App Store updates may lag a few days behind direct downloads due to Apple review.

Frequently asked questions

What is a XAR file?

XAR (eXtensible ARchive) is Apple's archive format. It's used internally by macOS installer packages (.pkg). You can extract XAR files with: xar -xf archive.xar or browse them visually with MacPacker.

Related formats