Convert XZ to TAR

Drag and drop files here or click to select.
Max file size 100mb.
Uploading progress:

XZ vs TAR Format Comparison

Aspect XZ (Source Format) TAR (Target Format)
Format Overview
XZ
XZ Utils / LZMA2 Compression

XZ is a high-ratio compression format developed by Lasse Collin, using the LZMA2 algorithm. It achieves the best compression ratios among standard Unix compression tools, making it the preferred choice for distributing Linux kernel sources, software packages, and large datasets. XZ is commonly paired with TAR to create .tar.xz archives.

Modern Lossless
TAR
Tape Archive

TAR (Tape Archive) is a Unix archiving format that bundles multiple files and directories into a single file without compression. Created in 1979, TAR preserves Unix file permissions, ownership, symbolic links, and directory structure. It is designed to be combined with external compression tools (gzip, bzip2, xz) to create compressed archives.

Standard Lossless
Technical Specifications
Algorithm: LZMA2 (improved LZMA with multi-threaded support)
Encryption: Not supported natively
Max File Size: Up to 8 EiB (theoretical)
Multi-file: Single-stream only (use tar for multiple files)
Extensions: .xz, .tar.xz, .txz
Algorithm: None (archiving only, no compression)
Encryption: Not supported
Max File Size: Up to 8 GiB (POSIX), unlimited (GNU tar)
Multi-file: Yes — primary purpose is bundling files
Extensions: .tar, .tar.gz, .tar.bz2, .tar.xz
Archive Features
  • Compression Ratio: Best among standard Unix tools
  • Integrity Check: CRC-64 and SHA-256 checksums
  • Streaming: Supports pipe-based compression
  • Block-based: LZMA2 splits data into blocks
  • Filter Chain: BCJ filters for executables
  • Memory: Configurable dictionary size
  • File Metadata: Preserves permissions, ownership, timestamps
  • Symbolic Links: Full symlink and hardlink support
  • Streaming: Sequential read/write, pipe-friendly
  • Incremental: Supports incremental backups
  • Append: Files can be appended to existing archives
  • Composable: Combines with any compression tool
Command Line Usage

XZ is available via xz-utils on all Unix/Linux systems:

# Decompress XZ to get TAR
xz -d archive.tar.xz
# Result: archive.tar

# Compress TAR with XZ
xz -9 archive.tar

# View XZ archive info
xz -l archive.tar.xz

TAR is built into every Unix/Linux system:

# Extract TAR archive
tar xf archive.tar -C ./output/

# Create TAR archive
tar cf archive.tar folder/

# List archive contents
tar tf archive.tar
Advantages
  • Best compression ratio among standard Unix tools
  • LZMA2 with configurable dictionary sizes up to 1.5 GiB
  • Built-in integrity checking with CRC-64
  • Multi-threaded compression (xz -T0)
  • BCJ filters for better executable compression
  • Standard for kernel and package distribution
  • Preserves all Unix file metadata and permissions
  • Supports symbolic and hard links
  • Can be combined with any compression algorithm
  • Incremental backup support
  • Universal Unix/Linux support since 1979
  • Simple, well-documented format
Disadvantages
  • Single-file compression only
  • Slow compression speed vs gzip/zstd
  • High memory usage at maximum levels
  • No encryption support
  • Not natively supported on Windows
  • No compression — files are stored at original size
  • No encryption or password protection
  • Sequential access only — no random file extraction
  • Not natively supported on Windows
  • No error correction or recovery capability
Common Uses
  • Linux kernel source distribution (.tar.xz)
  • Software package distribution
  • Large dataset compression
  • Backup archives for minimal storage
  • Open-source project releases
  • Unix/Linux file archiving and backup
  • Base format for compressed archives (.tar.gz, .tar.xz)
  • Preserving file permissions during transfer
  • Docker image layers
  • System deployment and configuration bundles
Best For
  • Maximum compression where speed is secondary
  • Linux software distribution and packaging
  • Long-term archival of large files
  • Bandwidth-constrained transfers
  • Bundling files while preserving Unix metadata
  • Intermediate format before applying compression
  • Streaming archive operations in pipelines
  • Incremental system backups
  • Recompressing with a different algorithm
Version History
Introduced: 2009 (Lasse Collin, XZ Utils)
Current Version: XZ Utils 5.6.x (2024)
Status: Open-source, actively maintained
Evolution: LZMA SDK (2001) → LZMA Utils (2004) → XZ Utils (2009)
Introduced: 1979 (Unix V7, Bell Labs)
Current Version: GNU tar 1.35 (2024)
Status: POSIX standard, actively maintained
Evolution: V7 tar (1979) → POSIX.1 ustar (1988) → POSIX.1-2001 pax (2001) → GNU tar
Software Support
Windows: 7-Zip, WinRAR, PeaZip
macOS: Keka, The Unarchiver, xz CLI
Linux: Built-in xz-utils, file-roller, Ark
Mobile: ZArchiver (Android)
Programming: Python lzma, liblzma (C), Commons Compress (Java)
Windows: 7-Zip, WinRAR, PeaZip
macOS: Built-in tar, Keka
Linux: Built-in tar, file-roller, Ark
Mobile: ZArchiver (Android)
Programming: Python tarfile, GNU tar, libarchive

Why Convert XZ to TAR?

Converting XZ to TAR is essentially decompressing a .tar.xz archive to get the underlying uncompressed TAR file. This is useful when you need to recompress the archive with a different algorithm — for example, switching from xz to gzip for faster decompression on systems where speed matters more than size, or to bzip2 for environments that don't have xz-utils installed.

Working with an uncompressed TAR file allows you to append files to the archive, which is impossible with a compressed .tar.xz. The TAR format supports appending new entries to the end of an archive, making it useful for incremental backup workflows where you add new or changed files over time without recompressing the entire archive.

Decompressing to TAR can also be a performance optimization. If you frequently need to extract files from the same archive, working with an uncompressed TAR is much faster since XZ decompression is CPU-intensive. For development workflows where you repeatedly extract, modify, and repackage files, having the intermediate TAR avoids redundant decompression cycles.

In Docker and container workflows, TAR is the native format for image layers. Converting .tar.xz files to plain TAR is necessary when importing container layers or when tools expect uncompressed TAR input. Similarly, some deployment scripts and automation tools work directly with TAR files and cannot handle XZ compression natively.

Key Benefits of Converting XZ to TAR:

  • Recompression: Switch to gzip, bzip2, or zstd compression as needed
  • Append Files: Add new files to the archive without full recompression
  • Faster Access: No CPU-intensive decompression for repeated extractions
  • Pipeline Compatibility: Feed into tools that expect uncompressed TAR
  • Docker/Container: Import layers in native TAR format
  • Metadata Preservation: All Unix permissions and symlinks maintained
  • Incremental Backups: Build upon existing TAR archives over time

Practical Examples

Example 1: Recompressing a Kernel Source for Faster Extraction

Scenario: A build server needs to extract the Linux kernel source thousands of times per day and xz decompression is a bottleneck.

Source: linux-6.8.tar.xz (142 MB)
Conversion: XZ → TAR
Result: linux-6.8.tar (1.4 GB)

Next step: recompress with gzip or zstd
  gzip: linux-6.8.tar.gz (215 MB) — 3x faster decompression
  zstd: linux-6.8.tar.zst (165 MB) — 5x faster decompression

Build server impact:
+ Extraction time: 45 sec (xz) → 8 sec (zstd)
+ 1000 builds/day saves ~10 hours of CPU time
+ Storage cost: +23 MB per copy (zstd vs xz)

Example 2: Importing Container Image Layers

Scenario: A DevOps engineer has exported container image layers as .tar.xz and needs to import them into a Docker-compatible runtime.

Source: app-layer-v3.tar.xz (85 MB)
Conversion: XZ → TAR
Result: app-layer-v3.tar (320 MB)

Docker import:
  docker import app-layer-v3.tar myapp:v3
+ Docker requires uncompressed TAR for layer import
+ All file permissions and ownership preserved
+ Symlinks maintained for shared library references
+ Can inspect layer contents before importing

Example 3: Appending Files to an Existing Archive

Scenario: A sysadmin has a weekly backup as .tar.xz and needs to add new configuration files without recreating the entire archive.

Source: weekly-backup-2026-w15.tar.xz (2.3 GB)
Conversion: XZ → TAR
Result: weekly-backup-2026-w15.tar (8.1 GB)

Append operation:
  tar rf weekly-backup-2026-w15.tar new-configs/
  xz -9 weekly-backup-2026-w15.tar

+ Added 50 MB of new config files to existing archive
+ No need to extract and recreate from scratch
+ Recompressed back to XZ for storage efficiency
+ Original archive contents fully preserved

Frequently Asked Questions (FAQ)

Q: How much larger will the TAR file be compared to XZ?

A: Significantly larger — TAR is uncompressed. A .tar.xz file is typically 5–15x smaller than the underlying .tar, depending on the data. For example, a 100 MB .tar.xz might expand to 500 MB–1.5 GB as a .tar file. The exact ratio depends on how compressible the original data is.

Q: What if my .xz file is not a .tar.xz?

A: If the source is a plain .xz file (single compressed file, not a tar archive), the conversion will decompress it to its original form. The result won't be a TAR archive — it will be whatever file was originally compressed. The converter handles both cases correctly.

Q: Can I recompress the TAR with a different algorithm?

A: Yes, that's one of the primary use cases. After converting to TAR, you can compress with gzip (tar.gz), bzip2 (tar.bz2), zstd (tar.zst), or any other compression tool. Each offers different trade-offs between compression ratio, speed, and compatibility.

Q: Are file permissions preserved during conversion?

A: Yes. XZ is a compression layer — it doesn't modify the underlying TAR data at all. The TAR archive stores all Unix metadata including permissions, ownership (uid/gid), timestamps, symbolic links, and special files. Decompressing XZ preserves all of this exactly.

Q: Is this conversion the same as running "xz -d"?

A: Essentially yes. Converting .tar.xz to .tar is equivalent to running "xz -d archive.tar.xz" on the command line. The web-based conversion provides the same result without needing to install xz-utils or use the command line.

Q: Why not just extract the files directly from .tar.xz?

A: Direct extraction is fine for one-time use. But if you need to repeatedly access, modify, or recompress the archive, working with the uncompressed TAR avoids redundant xz decompression each time. It's also necessary when tools require uncompressed TAR input (Docker, some backup tools).

Q: How long does XZ to TAR conversion take?

A: XZ decompression is moderately fast — typically 50–100 MB/s on modern hardware. A 100 MB .tar.xz file takes about 1–2 seconds to decompress. The speed is limited by the CPU since LZMA2 decompression is single-threaded in most implementations.

Q: Can I convert back from TAR to XZ later?

A: Yes, the conversion is fully reversible. You can recompress a TAR file with XZ at any time. The resulting .tar.xz will be identical in content (though not byte-for-byte identical due to compression being non-deterministic with different settings).