XZ
You can also paste a file or a link to a file with Ctrl+V
Don't see your format?
When you need XZ to TAR
XZ gives the strongest compression among the popular formats, so distribution images, large dumps, and builds are shipped as .xz and .tar.xz. But not every system can read XZ: loaders, build scripts, older utilities, and services sometimes accept only a plain tar. Conversion removes the compression and hands the file back as TAR.
What you get
- From a regular
.xzyou get a TAR with one file under its original name:dump.sql.xzbecomes a tar withdump.sql. - From a
.tar.xzyou get a TAR with all of its files laid out.
The data does not change; only the packaging does. The main difference: TAR does not compress, so the result can be several times larger than the source XZ. That is the price of compatibility.
When TAR beats ZIP
- The file goes into a system that takes tar rather than ZIP.
- A script or pipeline expects an uncompressed archive.
- You want a neutral container to compress differently later.
- For a person on Windows or Mac, XZ to ZIP is better: it opens with no software.
Common tasks and search situations
- tar.xz to tar without compression;
- the system accepts only tar;
- a distribution image in xz, tar needed;
- a .sql.xz export for a loader;
- prepare a build for a deployment script;
- repack xz without the command line;
- tar from xz on a computer with no utilities.
What to check before converting
- Make sure you need tar and not ZIP.
- Check the size: the file made from an XZ will be several times larger.
- If the download was interrupted, download the file again.
- For neighboring formats there are BZ2 to TAR and GZ to TAR.
Limitations
XZ is not password protected. A damaged or incomplete file may fail to unpack, and the service does not repair such data. TAR does not compress: if disk space is tight, keep the source XZ.
Related tasks
For opening on Windows and Mac - XZ to ZIP. For .bz2 - BZ2 to TAR; for .gz - GZ to TAR.
What is XZ to TAR conversion used for
Build for a deployment script
The script expects an uncompressed tar, but the build arrived as tar.xz.
Image for a loader
The loader reads tar, while the image is distributed as .xz.
Dump for import on a server
An export in .sql.xz is not accepted directly, while tar fits.
Preparing for different compression
You need a neutral container to compress in your own way.
Tips for converting XZ to TAR
Plan disk space ahead
An uncompressed tar from XZ can grow several times over. Check free space.
Choose ZIP for people
If the file will be opened on Windows or Mac, ZIP is more convenient.
Verify a complete download
A truncated .xz does not convert: download it again.