XAR File Format (.xar)
An XAR file is Apple's eXtensible ARchive, a container that lists its contents as compressed XML at the start of the file and stores the compressed payload data afterward.
XAR at a glance#
| Full name | eXtensible ARchive |
|---|---|
| File extension | .xar |
| Category | Archives |
| Developer | OpenDarwin project |
| MIME types | application/x-xar |
| Other extensions | .pkg |
| Compression | Lossless |
| FileFlip support | FileFlip does not handle this format |
What a .xar file can hold#
These are the things a XAR file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.
| Lossless compression | Yes |
|---|---|
| Embedded metadata | Yes |
Strengths and limitations of XAR#
What XAR does well
- Stores its whole table of contents as one compressed XML block up front, so a reader can list everything inside without scanning the file
- Each file in the heap can use a different compression method, so already-compressed assets can be stored without recompressing them
- Signs the table of contents against a certificate chain, which is how macOS installer packages verify their contents before running
Where XAR falls short
- Almost no software outside the Apple ecosystem creates or reads XAR files
- The reference documentation lives in a project wiki rather than a formal specification
- A flat .pkg is a single XAR file, but many .pkg installers are bundle directories instead, so not every .pkg is a XAR archive
XAR shows up when inspecting or building a macOS installer package, since flat .pkg files are XAR archives underneath.
Convert a XAR archive to ZIP or tar when its contents need to be read on a system without Apple's installer tooling.
How to open a .xar file#
A .xar file opens in the programs below, grouped by the platform you are on.
| Platform | Programs that open it |
|---|---|
| Windows | 7-Zip |
| macOS | Suspicious Package, Pacifist, xar (command line) |
| Linux | p7zip |
| Web | FileFlip |
XAR questions people ask#
Is a macOS .pkg file the same as a XAR file?
A flat .pkg installer, the single-file kind Mac OS X Leopard introduced, is literally a XAR archive with a different extension. Older bundle-style .pkg installers are a folder structure instead, so not every .pkg you see is a XAR file.
What's inside a XAR archive?
A XAR file starts with a header, then a zlib-compressed XML table of contents describing every file inside, followed by a heap holding the actual file data, each entry compressed however the archive's creator chose. That XML-first layout is what lets tools list an archive's contents without reading the whole file.
Can I open a XAR file on Windows or Linux?
7-Zip on Windows and p7zip on Linux both extract XAR archives, though tools built specifically for macOS installer packages, like Suspicious Package, show more of the metadata a .pkg carries.
Converting XAR files#
FileFlip cannot open a .xar file, so there is nothing to convert it into here. It appears on the site as something other formats can be converted to.
FileFlip does not write .xar files, so nothing on the site converts into this format. It works as a source only.
Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.