FILE FORMAT GUIDE
XZ File: Inspect and Decompress a Stream
An XZ file contains compressed data in an XZ stream. Decompress it with a compatible tool to recover the underlying file. For .tar.xz, that underlying file is a TAR archive rather than an already extracted directory.
Quick facts
- Extension
- .xz
- Format
- XZ Compressed Stream
- Category
- archive
- MIME type
- application/x-xz
- Standard / developer
- Tukaani / XZ format authors
- Open with
- 7-Zip
What is XZ?
XZ is a stream container with headers, compressed blocks, an index and integrity-check information. It supports filter-chain compression, including LZMA2. Recognizing its header does not establish the purpose or safety of the decompressed data.
How to open XZ
Listing, integrity testing and decompression are different operations. Keep the input when comparing the result.
7-ZipWindows
Open the XZ and inspect the output filename. If it contains a TAR, inspect that next archive layer before extracting its entries.
Common uses and compatibility
- Compress a file or a TAR archive for storage and transfer.
Things to check
- Decompression can require substantial memory or output space, depending on the data and settings.
- An integrity test checks compressed data; it does not approve the content for execution.
Advanced inspection
These developer and command-line workflows inspect structure or metadata. They are not the default way most people open the file.
XZ UtilsCommand line; xz required
Use xz --list or --test for inspection. Use --decompress --keep when decompression is intended.
Technical details
- Signature
- FD 37 7A 58 5A 00 at offset 0
- Encoding
- Unknown
- Container
- XZ streams containing headers, blocks, an index and a footer
- Compression
- Block filter chains defined by XZ, including LZMA2
Open an XZ with a desktop archive reader
7-Zip lists XZ among its supported formats. Open it to inspect the outer compression layer; if the output is a TAR, browse that archive separately before extracting its entries.
Sources: 7-Zip supported archive formats
Inspect, test or decompress with XZ Utils
Use --list for stream information and --test to check compressed integrity. For decompression, --keep preserves the input file; omit --force so an existing output is not deliberately overwritten.
Choose one operation for a known file
xz --list "example.xz"
xz --test "example.xz"
xz --decompress --keep "example.xz"Sources: xz manual: list, test, decompress and keep — Tukaani
Why does decompression produce another archive?
XZ operates on a data stream; it does not substitute for the format of the original input. A .tar.xz combines two layers. A file renamed from .xz to .zip has not been converted into ZIP entries.
Sources: The .xz file format — Tukaani · 7-Zip supported archive formats
Related formats
- TAR Archive
A .tar.xz file is a TAR archive compressed with XZ; the output TAR remains a separate layer.
- GZIP Compressed File
GZIP is a different compression format and needs a compatible decoder.
Sources & review
Sources reviewed 2026-11-15.