Open XZ files on Mac
Open a standalone .xz in Kernir and extract its entry, or use the xz command if you have it installed. A filename such as database.sql.xz usually represents one compressed file. For a folder tree packaged as .tar.xz, use the TAR.XZ instructions.
Check which tool you have
Support for TAR.XZ in the Mac's tar does not mean there is a standalone xz executable on the command path. Check in Terminal:
command -v xz
If it prints a path, the following commands can use that installation. If it prints nothing or the shell reports that xz is unavailable, use an application that supports XZ, such as Kernir. Do not paste an extraction command repeatedly when the executable itself is missing.
The XZ Utils project maintains the tool and its documentation. An installed command's version and features can differ from the library built into another application.
Decompress and retain the input
With xz available, go to the input directory. For a file in Downloads:
cd ~/Downloads
xz -dk "database.sql.xz"
The -d option decompresses and -k keeps the compressed file. This example writes database.sql beside it. Use a fresh location if that output already exists; do not add -f just to bypass an overwrite warning.
The expanded file may be much larger than the download. Keep enough disk space for the original and output, and check that the command completed before importing the result into a database or another application.
Inspect compression information
The standalone tool also offers listing and testing:
xz -l "database.sql.xz"
xz -t "database.sql.xz"
Here -l shows information about the compressed stream, not a list of files inside a folder. -t checks the data without producing an expanded file. The XZ manual explains these distinct operations.
If an error mentions a memory limit, distinguish that from a damaged download. Decoder resource requirements depend on how the stream was created and the limits of the reader. Ask the sender for a more suitable compressed copy when needed; a password cannot solve a memory or format-support error.
Use Kernir without Terminal
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) and select the XZ. For a standalone stream, select the entry and choose File › Extract… (⌘E). Kernir derives the entry name from the compressed filename without the last extension. If the original type is unclear, check with the sender instead of guessing a document extension.
Kernir reads standalone XZ but does not write it. TAR.XZ is different: the app can create or edit that archive combination. Save As can put an extracted standalone file into a supported output format, but it does not turn the app into a standalone XZ writer.
To try a small file with known contents, use the sample archive library. Substitute the downloaded sample's filename in the commands above.
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 .
