.xz File Extension

Learn what a .xz file contains, how to open and verify XZ data, how Poly supports it, and when to use TAR or another compression format.

File extension details for .xz

Storage Only
File typeXZ compressed file
MIME type
EncodingBinary XZ stream, usually using lossless LZMA2 compression
Operating systemsWindows, macOS, Linux
Opens withXZ Utils, 7-Zip, GNU tar
Poly supportYes. Poly stores, syncs, shares, versions, and downloads XZ files.
Indexed by PolyPartial. Poly indexes the filename and ordinary file properties, not compressed contents.
Preview in PolyNo. Download the file to decompress or inspect it with a compatible utility.
Poly agentNo. The Poly agent cannot read data inside an XZ stream.

What kind of file is a .xz?

A .xz file contains data compressed in the XZ stream format. XZ is lossless, so successful decompression reproduces the original bytes exactly. It conventionally uses the application/x-xz MIME type, although IANA does not currently register that subtype.12

XZ compresses a stream rather than organizing several files. A name such as source.tar.xz usually means that TAR first bundled files and directories, then XZ compressed the resulting TAR stream.

An XZ stream begins with the six magic bytes FD 37 7A 58 5A 00. Check those bytes and validate the full stream instead of trusting the filename. Renaming a Gzip, ZIP, or legacy .lzma file to .xz does not convert it.1

How do I open a .xz on my computer?

  • On Windows, use 7-Zip or a Windows build of XZ Utils.
  • On macOS and Linux, install or use XZ Utils from Terminal. Desktop archive apps may also handle XZ when their installed backends support it.
  • For a .tar.xz archive, GNU tar can invoke XZ directly.3

To preserve the compressed input while writing the decompressed file:

xz -dk report.csv.xz

Test a complete stream without saving its output with xz --test download.xz. For a tarball, inspect member names before extraction with tar -tJf source.tar.xz. XZ does not store the original filename, so the decompressed output may be text, an image, a TAR archive, or any other byte sequence.4

Poly support for .xz

Poly recognizes .xz files and lets you store, sync, share, version, download, and find them by filename and ordinary file properties. It does not decompress XZ streams, inspect TAR members, generate thumbnails, provide an archive preview, or index the compressed payload. The Poly agent cannot read content inside the stream.

When you need preview, content search, or agent access, decompress the file with a trusted utility and add the resulting supported files to Poly separately.

History of .xz

Lasse Collin and Igor Pavlov designed the XZ format. Version 1.0.0 of its specification appeared on January 14, 2009. XZ was created as a successor to the older LZMA-Alone format used by LZMA Utils and the LZMA SDK.1

The reference XZ Utils suite includes the xz command, the liblzma library, and the smaller xzdec decompressor. XZ is a container for filter chains rather than another name for bare LZMA data. Streams commonly finish their chain with LZMA2 compression.4

Working with .xz and alternatives

Choose the layers and format that match the job:

FormatGood fitMain distinction
XZCompact lossless compression of one streamNo archive directory
TAR + XZUnix source releases and backupsTAR stores members; XZ compresses the stream
GzipBroad Unix compatibilityOften faster, usually less compact
ZstandardHigh-throughput modern compressionCommonly chosen when speed matters
ZIPSharing multiple files across desktop systemsBuilt-in directory and per-entry compression
A small .xz can expand into a much larger output, and a valid stream can request substantial decoder memory. Set memory and output limits for untrusted data. If the output is a TAR archive, inspect paths, links, and executables before extraction.4

XZ metadata always uses CRC32 protection. The uncompressed data may use CRC32, CRC64, SHA-256, or no integrity check; XZ Utils uses CRC64 by default.14 These checks detect accidental corruption. They do not authenticate the sender or prove that the decompressed content is safe.

Footnotes

  1. The Tukaani Project. The .xz File Format Specification. Version 1.2.1 documents the extension, designers, 2009 origin, stream signature, structure, filters, and integrity checks. 2 3 4
  2. Internet Assigned Numbers Authority. Media Types Registry. The application registry does not currently list application/x-xz.
  3. Free Software Foundation. Creating and Reading Compressed Archives. The GNU tar manual documents the --xz and -J filters.
  4. The Tukaani Project. XZ Utils xz(1) Manual. The manual documents suffix handling, commands, checks, filter chains, and memory limits. 2 3 4
© Poly Corp. 2026