XZ File Format (.xz)
An XZ file is a single stream compressed with LZMA2 inside a container that adds framing, size fields and a CRC or SHA-256 integrity check, specified by the Tukaani project's xz format starting in 2009.
XZ at a glance#
| Full name | xz compressed archive |
|---|---|
| File extension | .xz |
| Category | Archives |
| Developer | Tukaani Project (Lasse Collin) |
| First released | 2009 |
| MIME types | application/x-xz |
| Compression | Lossless |
| Specification | The .xz File Format |
| FileFlip support | FileFlip reads and writes this format |
What a .xz file can hold#
These are the things a XZ file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.
| Streaming | Yes |
|---|
Strengths and limitations of XZ#
What XZ does well
- LZMA2 compression regularly beats both gzip and bzip2 for ratio on the same data
- Decompression is fast, much closer to gzip's speed than to bzip2's despite the tighter compression
- Supports a SHA-256 integrity check option, stronger than the CRC-32 gzip and bzip2 rely on
Where XZ falls short
- Compression itself is slow and memory-hungry at high preset levels, sometimes taking minutes on large inputs
- Compresses a single file or stream only, so archiving multiple files needs tar first
Use XZ when the smallest practical archive size matters more than how long compression takes, which is why Linux distributions compress their packages and kernel source with it.
Convert XZ to GZ when the archive needs to decompress on something old or constrained enough that gzip's lighter decoder matters.
How to open a .xz file#
A .xz file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts XZ into a format your machine already opens, and it does it in the browser tab rather than on a server.
| Platform | Programs that open it |
|---|---|
| Windows | 7-Zip, WinRAR |
| macOS | Archive Utility |
| Linux | Archive Manager (File Roller), xz (terminal) |
| Web | FileFlip |
XZ questions people ask#
Why do Linux distributions use .xz for packages?
xz compresses tighter than gzip or bzip2 on most data while still decompressing quickly, which matters because package managers decompress far more often than they compress. That ratio-versus-decompression-speed balance is why Debian, Fedora and the Linux kernel have shipped source and package archives as .xz for years.
Is xz the same as LZMA?
xz is a container format built around LZMA2, an improved version of the older LZMA algorithm, adding a proper file header, block structure and a CRC or SHA-256 integrity check that raw LZMA files never had. The Tukaani Project's .xz format specification was first released in 2009.
Why is xz compression so slow?
xz's LZMA2 algorithm searches harder for redundancy than gzip's DEFLATE or bzip2's Burrows-Wheeler transform, which is exactly what gives it a better compression ratio, but that search takes real CPU time and memory, especially at higher presets. Decompression doesn't carry this cost and stays fast.
Was the xz format itself compromised in the 2024 backdoor?
No. The 2024 incident, CVE-2024-3094, planted malicious code in the XZ Utils build scripts and the liblzma library in versions 5.6.0 and 5.6.1, not in the .xz file format itself. Files compressed as .xz were never the vector; the risk was in that specific compromised version of the software that reads and writes them.
Converting XZ files#
Convert XZ to another format
Convert another format to XZ
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.