THE FILE FIELD GUIDE
.xz

XZ Archive

Archives

XZ stores compressed streams; TAR.XZ combines TAR packaging with XZ compression. Large dictionaries may require substantial decompression memory, independently of compressed size.

What it is used for
Compression of data or TAR archives
What the file contains
Binary data
All sections, questions and sources

Content reviewed: · Editor:Kai

Opening steps

Choose your environment or purpose to see its steps.

Windows: inspect with 7-Zip

Inspect the listing before extracting.

  1. Open a copy in 7-Zip File Manager.
  2. Inspect the decompressed type and estimated size.
  3. Extract to an empty work folder and inspect output names/sizes and the retained source.
Mac / Linux: compatible command-line tool

Use these commands only where the relevant tool is installed.

  1. Inspect size information using xz --list "data.xz".
  2. Test with xz -t "data.xz"; use xz -dk "data.xz" to decompress while retaining the input.
  3. For memory/storage failures, inspect the environment without modifying the source.
After extraction: open the result

Choose the next step from the resulting format.

  1. For archive.tar.xz, inspect the resulting TAR before extracting it to a separate folder.
  2. Load resulting CSV, SQL, images or other data with the appropriate application.
  3. Retain the archive; successful extraction is not a reason to run an embedded executable.

Menu labels and support vary by app, OS and version. Preserve the original before making changes.

Troubleshooting by symptom

  • Memory failure: inspect decompression requirements and configured limits.
  • Unsupported format: distinguish XZ from older LZMA formats and use a supported tool.
  • Truncation error: verify transfer completion and published size/checksum.
  • Memory-limit error: inspect requirements and tool limits; it need not indicate damage.
  • Only decompressed TAR.XZ once: inspect both compression and TAR layers.
  • Renaming to LZMA fails: distinguish XZ from legacy LZMA containers.

XZ → original data / ZIP

  1. Decompress a copy and extract any nested archive separately.
  2. If needed, package as ZIP and compare contents/layout.
  3. Inspect resulting folders, file counts and sizes. When repacking, verify the new listing and a test extraction.

Renaming does not change compression; check preservation of metadata in the destination format.

Separating resource limits from damage

Some XZ settings need substantial decompression memory. Read the error and inspect a suitable environment.

Do not remove limits blindly; check available resources and publisher requirements.

Source for these steps:XZ Utils · xz command manual

After decompression

Move to the appropriate next checks: TAR listing/destination, SQL database dialect or IMG disk format.

When repacking, compare counts and contents and retain the original XZ’s integrity information.

Source for these steps:XZ Utils · xz command manual

Related-format differences

Related-format differences
FormatMain roleSelection notes
XZXZ compression layerCheck memory and storage
TAR.XZCompressed TARExtract TAR after decompression
LZMADifferent compressed containerRenaming does not convert

Handling and security

Inspect origin, output size and destination; do not automatically run extracted programs/scripts.

Questions and answers

Is XZ a folder archive?

It normally compresses a stream and may wrap TAR.

Why can a small XZ fail to decompress?

Dictionary and memory requirements can still be large.

Can I rename it 7z?

No; decompress and recompress it properly.

Does XZ bundle files?

It typically compresses data such as TAR; distinguish compression from bundling.

Does a successful test prove safety?

It checks compressed-data integrity. Assess content and origin separately.

Format facts: name, steward and MIME type
Formal name
XZ compressed stream
Steward / specification
Tukaani Project
MIME type
Depends on the producer or server; an extension alone does not establish a MIME type.

Primary and official sources

  • Project documentationXZ Utils

    Publisher documentation for XZ tools.

    Tukaani Project · Link checked:
  • Software documentation7-Zip — Supported formats

    Lists supported archive and disk-image formats.

    Igor Pavlov / 7-Zip · Link checked:
  • Project documentationxz command manual

    Listing, integrity tests, decompression and memory limits.

    XZ Utils · Link checked: