Kernir

Open TAR.XZ on Mac

Open a .tar.xz on Mac with the libarchive-based tar command or with Kernir. It contains a TAR archive compressed with xz. Kernir can browse and extract the files, and can also create or edit TAR.XZ archives.

TAR.XZ versus XZ

The TAR layer stores multiple files, paths and folders. XZ compresses the byte stream containing that archive. A standalone .xz, such as database.sql.xz, can instead contain one compressed document. See the XZ guide when there is no TAR inside.

You do not need the standalone xz command merely to read a TAR.XZ if your Mac's tar supports its compression. The archive reader decompresses the stream and reads the entries in one operation. This avoids keeping a second, potentially large .tar file just as an intermediate step.

List before unpacking

For an archive stored in Downloads:

cd ~/Downloads
tar -tf "Source.tar.xz"

Use the actual filename. Reading detects the format and compression from the contents. The output helps you see whether the archive includes a single project folder and locate the files you want.

If your installed tool reports unsupported compression, that is a reader limitation to investigate, not evidence that renaming the file will help. Kernir is another way to inspect a supported TAR.XZ. A truncated download can also fail before a useful listing appears.

Extract the files

Create a new destination and extract into it:

mkdir "XZ archive output"
tar -xvf "Source.tar.xz" -C "XZ archive output"

Choose another name if that folder already exists. A separate destination avoids mixing downloaded files with an existing project; extraction may replace matching paths. Make sure enough disk space is available for the expanded files, which can be much larger than the download.

Wait for completion and check errors before opening the result. A TAR.XZ containing source code may need separate build instructions from its publisher. Unpacking an archive does not select a compatible operating system or install dependencies.

Create a TAR.XZ

From the directory containing a folder named Project:

tar -cJf "Project-copy.tar.xz" "Project"
tar -tf "Project-copy.tar.xz"

Choose an unused output name. The capital -J selects xz compression. Keep the output outside Project, check the stored layout, and try extracting the result before deleting your original files.

Compression level affects resource use as well as size. The XZ manual documents these tradeoffs; the highest setting is not automatically the best choice for every recipient. Compare actual files when size matters rather than assuming a universal improvement over gzip or ZIP.

Use Kernir instead

The Mac download is coming soon. You can view the source and build instructions on GitHub. These steps describe the current app workflow.

Choose File › Open… (⌘O), browse the TAR.XZ and select the entries to extract with File › Extract… (⌘E). To keep a separate edited copy, use File › Save As… (⇧⌘S), choose TAR.XZ and a new name.

TAR.XZ is writable in Kernir, while standalone XZ is read-only. TAR.XZ output does not offer password encryption in Kernir. If you need to send a protected archive, choose a format and encryption method supported by both sender and recipient.

To try a small file with known contents, use the sample archive library. Substitute the downloaded sample's filename in the commands above.

Download for Mac

Kernir.dmg, signed and notarized. Requires macOS 14 or later.

Related guides

App steps were checked against Kernir source code. Command examples were checked with test archives on Linux using libarchive and the named utilities, not in a new macOS session. Updated .

Buy me a coffee