An XZ file is an archive compressed using XZ compression, a high ratio compression algorithm based on the LZMA algorithm. It contains one or more files compressed by the xz command-line tool included with XZ Utils.
You may download an XZ file from the Internet or receive an archive from a friend or co-worker who has used XZ Utils to compress an archive to reduce its size. XZ files are commonly used to distribute Slackware Linux package distributions.
You can decompress XZ compressed archives and view their contents with a variety of programs. If you are a Windows user you can use 7-Zip or WinRAR, and if you are a macOS user, you can use The Unarchiver or Keka to open XZ files. If you are a Linux user, you use XZ Utils to compress and decompress XZ files.
NOTE: XZ files that contain a .TAR archive are saved as .TXZ files.