How to extract a TAR, TAR.BZ2 or TAR.XZ file
- Drop the archive onto the drop zone above, or click Choose a file. Accepted names are
.tar,.tar.bz2,.tbz2,.tar.xzand.txz. - Skip Password (only if the archive is encrypted). The tar format has no password protection of its own.
- Click Extract files. If the tarball is compressed, the bzip2 or xz layer is removed automatically before the files are unpacked.
- Download files one by one, or click Download all (ZIP) to receive the whole set as a ZIP.
The archive is unpacked by libarchive running as WebAssembly in this tab. It is not uploaded anywhere, so it is safe to use for backups and private project folders.
Plain tar versus compressed tarballs
A plain .tar file is simply many files laid end to end, each preceded by a 512-byte header holding its name, size, owner, permissions and modification time. It is no smaller than the files it contains. Container images, some backup tools and many build systems produce uncompressed tar because it is fast to write and read.
When size matters, the tar stream is passed through a compressor and given a second extension. The short forms are common on systems and download sites that prefer a single extension:
| Long name | Short form | Compressor | Command to extract |
|---|---|---|---|
.tar | none | none | tar -xf file.tar |
.tar.bz2 | .tbz2 | bzip2 | tar -xjf file.tar.bz2 |
.tar.xz | .txz | xz (LZMA2) | tar -xJf file.tar.xz |
In the commands, j selects bzip2 and the capital J selects xz. Modern GNU tar and bsdtar can also detect the compression on their own, so tar -xf usually works for all three. These commands are available on Linux, macOS and in the Command Prompt of Windows 10 and 11.
bzip2 and xz both compress better than gzip, which is why software projects often publish source code as .tar.xz. xz typically gives the smallest file and also decompresses faster than bzip2.
Tips
- For
.tar.gzand.tgzfiles, use Extract TAR.GZ. - Want the files as a ZIP instead? TAR to ZIP converts tar archives, and Archive Converter handles the compressed variants too.
- To make a tarball, use Create TAR or Create TAR.XZ.
.bz2 or .xz, without .tar before it, is a single compressed file rather than a tarball. Those cannot be decompressed here; use bunzip2 or unxz on the command line.Frequently asked questions
Are long and non-English file names supported?
Yes. Long paths and Unicode names stored with the POSIX pax extensions or GNU long-name records are read correctly by libarchive.
Does extracting restore permissions and dates?
No. Files are saved through the browser as ordinary downloads with the current date, and the permission bits in the tar headers are not applied. Use the tar command when they matter.
What is the size limit?
Everything is processed in memory. Archives above about 700 MB are slow and anything over 2 GB is refused.