.XZ

XZ File

XZ Compressed Archive
Ask a question
QUICK ANSWER

An .xz file is a compressed archive created with XZ Utils, using the LZMA2 algorithm. It usually wraps a single file - most often a .tar - so you commonly see .tar.xz. On Windows, open it with 7-Zip or PeaZip. On macOS, use The Unarchiver or Keka. On Linux, run tar -xf file.tar.xz. The format has no encryption and no built-in malware risk.

Developer: Tukaani Project (Lasse Collin) Category: Compressed Files Open standard MIME: application/x-xz
OPENS ON Windows macOS Linux
Related: .RAR · .ZIP · .Z01 · .7Z

On this page

19k+ extensions indexed
Last reviewed Aug 16, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the XZ file format?

.xz is a compressed archive file format that uses the XZ compression method. The format is native to XZ Utils, the reference software tool developed as part of The Tukaani Project (a GNU/Linux distribution based on Slackware).

XZ and TAR

An .xz archive can store only a single compressed stream and carries no directory tree of its own. Because of that, .xz files are commonly used in combination with TAR archives - TAR collects selected files into a single archive, and the XZ algorithm is then applied for compression. The resulting file carries the suffix .tar.xz or .txz.

LZMA2 compression algorithm

XZ compression is based on the LZMA2 algorithm - an evolution of the original LZMA standard. It allows for high compression ratios and results in significantly reduced file sizes: XZ archives are typically 30% smaller than GZIP and 15% smaller than BZIP2 archives. XZ offers lossless compression to prevent any information loss.

Additional notes

  • Compared to other compression methods, the XZ compression process is rather slow, but decompression is significantly faster.
  • XZ archives are widely used for distributing Linux software packages, including Slackware and most major kernel source tarballs.
  • The .xz format identifies itself with the fixed 6-byte header magic FD 37 7A 58 5A 00 and verifies integrity using per-block and per-stream CRC64 checksums by default (CRC32 and SHA-256 are also supported).
  • In early 2024, XZ Utils versions 5.6.0 and 5.6.1 were found to contain a deliberately injected backdoor (CVE-2024-3094) in the liblzma library. The .xz file format specification is unaffected; only those specific build tarballs were compromised.

Security & safety

RISK: LOW

The .xz format carries no executable code and cannot 'run'; risk comes only from what is inside (extract before trusting). Note the 2024 supply-chain incident (CVE-2024-3094): a backdoor was inserted into the liblzma build of xz 5.6.0/5.6.1 shipped in some distro test channels - that affects the tool/library binaries, not .xz files you receive. Beware fake 'xz opener' download sites bundling adware; use 7-Zip/PeaZip from their official pages.

Format details

in a nutshell
FULL NAMEXZ Compressed Archiveaka XZ Utils compressed file, LZMA2 compressed stream
DEVELOPERTukaani Project (Lasse Collin)since 2009 (XZ Utils 4.999.x / 5.0; format finalized 2009)
MIME TYPEapplication/x-xz
TYPESingle-stream compressed container (LZMA2), usually wrapping a tar archive
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102030405
HEX
FD377A585A00
ASCII
·7zXZ·
Last 2 bytes of any .xz file are the footer magic 59 5A ("YZ"). Not related to the 7-Zip .7z format despite the '7z' in the magic string.

Programs that open XZ files

Windows3 apps
7-Zip Open-source Right-click the .xz → 7-Zip → Extract Here; for .tar.xz extract twice (xz, then the tar).
PeaZip Open-source Open the .xz in PeaZip and click Extract; handles .tar.xz in one pass.
NanaZip Open-source Modern 7-Zip fork from the Microsoft Store - right-click → extract the .xz/.tar.xz.
macOS3 apps
The Unarchiver Free Double-click the .xz; The Unarchiver decompresses (and untars .tar.xz) automatically.
Keka Free Drag the .xz onto Keka to extract; supports .tar.xz directly.
Terminal (xz / tar) Built-in Run tar -xf file.tar.xz (macOS bsdtar handles xz) or install xz via Homebrew.
Linux3 apps
XZ Embedded Open-source Decoder-only C library for embedded/bootloader use - not an end-user app; for developers decompressing .xz in constrained systems.
xz / XZ Utils Open-source xz -d file.xz to decompress, or tar -xf file.tar.xz for tarballs. Pre-installed on most distros.
Archive Manager (GNOME) / Ark (KDE) Open-source Double-click the .xz in the file manager and click Extract.

Technical details

deep spec
Compression algorithmLZMA2 (evolution of LZMA); optional filter chain with delta and BCJ (branch/call/jump) filters
Container structureStream header → one or more compressed blocks → block index → stream footer
Stream header magicFD 37 7A 58 5A 00 - fixed 6 bytes at offset 0
Stream footer magic59 5A ("YZ") - always the last 2 bytes of every .xz stream
Byte orderLittle-endian
MIME typeapplication/x-xz
Integrity checkingPer-block and per-stream checksums; default CRC64; CRC32 and SHA-256 also supported
EncryptionNone - no built-in encryption; encrypt data before compression if needed
File storageSingle compressed stream only; no filenames or directory tree (combine with .tar for multi-file archives)
EncodingBinary
Typical compressed sizeTens of KB to several GB; Linux kernel source tarballs commonly 50-200 MB
Compression ratio vs. alternativesTypically ~30% smaller than gzip and ~15% smaller than bzip2 on source code
Security noteCVE-2024-3094: XZ Utils 5.6.0/5.6.1 tarballs contained a backdoor in liblzma; the .xz file format specification is unaffected
Platform supportLinux, BSD, macOS, Windows (via XZ Utils, 7-Zip, PeaZip, NanaZip, The Unarchiver)
Released2009 (XZ Utils 4.999.x / 5.0; format finalized 2009)
Latest versionXZ file format 1.0.4 (2009); XZ Utils 5.6.x toolchain
Open standardYes · royalty-free
Specificationtukaani.org

XZ conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with XZ files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about XZ files.

Frequently asked questions

How do I open an .xz file on Windows?
Install 7-Zip or PeaZip, right-click the file and Extract. If it's a .tar.xz, extract twice - first the xz layer, then the resulting .tar.
What is the difference between .xz and .tar.xz?
.xz compresses a single stream and stores no file names. .tar.xz is a tar archive (which holds many files and folders) that has then been xz-compressed - the common Linux software format.
Is .xz better than .gz or .zip?
Usually yes for size - LZMA2 compresses tighter than gzip/zip. The trade-off is slower compression and that .xz alone holds one stream, so it's paired with tar for multiple files.
Is the xz file format affected by the xz backdoor (CVE-2024-3094)?
No. The backdoor was in the build of the xz/liblzma software (versions 5.6.0/5.6.1), not in the file format. Files compressed as .xz are not malicious because of it.
How do I decompress .xz on Linux?
xz -d file.xz to get the original file, or tar -xf file.tar.xz to unpack a tarball. xz is preinstalled on most distributions.
Can I open .xz on macOS without the command line?
Yes - The Unarchiver or Keka open .xz and .tar.xz by double-click or drag-and-drop.

References

1Tukaani - The .xz File Format specificationtukaani.org
2Tukaani - XZ Utils hometukaani.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.MDMarkdown Document
4.PARTPartial Download File
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Related extensions

.RARRAR Archive (Roshal ARchive)
.ZIPZIP Archive
.Z01Split ZIP Archive - First Part
.7Z7-Zip Archive
.001Split / multi-volume archive - first part (.001)
.ZIRenamed / Truncated ZIP Archive

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z