Tooleux

XZ Decompress

XZ (2)

Decompress XZ data back to text or bytes.

Runs in your browser. Nothing leaves your device.
Decompress XZ (LZMA2) data in your browser. Free, offline, runs entirely client-side. Read more Show less

What is XZ decompression?

XZ decompression reverses the compression performed by XZ Compress. It reads a Base64 or hex encoded XZ stream and produces the original text.

XZ is a container format built around LZMA2. It is used for software distribution, backups, and Linux tarballs, among other things.

How to use

Paste the Base64 or hex XZ data, choose the matching input format, and press Decompress. The output is shown as text if it decodes to valid UTF-8, otherwise as hex so you can inspect the bytes.

Why does decompression fail?

Four common reasons:

Wrong input format. Base64 and hex are different. If the data was produced as Base64 and you select hex, the parser produces the wrong byte sequence and the XZ magic bytes are missing.

Truncated data. XZ has a mandatory footer with a stream index. Cutting off any part of the stream (usually during copy-paste) makes it unreadable.

Corrupted data. XZ includes a CRC check. If the checksum fails, decompression aborts.

Not XZ at all. Gzip, bzip2, zstd, and 7-zip are different formats with different magic bytes. If your data starts with 1F 8B it is gzip, not XZ. Use the matching tool.

FAQ

How do I know if data is XZ?

The first six bytes of an XZ stream are the magic number FD 37 7A 58 5A 00. In Base64 that appears as the prefix /Td6WFoA. In hex it appears as fd377a585a00.

Can this tool decrypt encrypted XZ?

XZ does not encrypt. It only compresses. If your data is both compressed and encrypted, decrypt it first (AES, ChaCha20), then decompress.

My XZ file uses a specific dictionary size I do not know

You do not need to know it. The dictionary size is stored in the XZ container header and read automatically during decompression.

Is the decompressed output binary or text?

XZ can compress anything. If the original was text, you get text. If the original was a file (image, PDF, executable), you get bytes that look like garbage as text. Switch the output format to hex or Base64 to see them.

Command line equivalent
# Decompress
xz -d input.xz
echo "BASE64_DATA" | base64 -d | xz -d

# Show file info without decompressing
xz -l input.xz

# Test integrity
xz -t input.xz
Loads a test value into the form
Compressed (XZ)
Decompressed