How to Convert TAR.XZ to TB2 Online
- Upload Your TAR.XZ File: Drag and drop the archive into the upload area, or click "+ Add Files" to browse. Multiple
.tar.xz(or.txz) archives can be queued in one batch. - Pick Combine Mode: Under "Combine?", choose Single Archive to bundle every uploaded file into one
.tb2, or Individual Archives to produce a separate.tb2per input. For tar-to-tar conversions the default is Individual Archives so each source archive becomes its own bzip2-compressed output. - Confirm Output Extension (Optional): The target is fixed to TB2 — the shorthand spelling of
.tar.bz2. If you need a different container (.tar.gz,.tar,.7z,.zip), pick that conversion instead before uploading. - Convert and Download: Click Convert. The server decompresses LZMA2 streams, re-wraps the tar payload with bzip2, and returns the
.tb2file. No watermarks, no sign-up, no install.
Why Convert TAR.XZ to TB2?
.tar.xz (LZMA2) and .tb2 / .tar.bz2 (bzip2) are both POSIX tar containers wrapped in a stream compressor, but they trade off compression ratio against CPU cost very differently. XZ shrinks more aggressively; bzip2 compresses faster, has been in tar-friendly toolchains since 1997, and is still the lowest-common-denominator non-gzip format that virtually every Unix system can decompress without extra packages.
- Legacy build systems that predate xz — bzip2 shipped in 1997 (Julian Seward); the xz format spec wasn't finalized until January 2009. Old autotools chains, embedded BSD images, and locked-down CI runners frequently ship
bzip2but notxz-utils. Re-wrapping a.tar.xzas.tb2lets those systems extract the payload natively. - Decompression speed on older hardware — bzip2 is single-threaded and CPU-bound, but on a fixed corpus its decompress step is straightforward and predictable. For one-shot installs on low-RAM boxes that struggle with LZMA2's larger dictionary,
.tb2can be easier to stream. - Source code & text-heavy payloads — both formats handle source trees well. If you're forking a project that originally distributed
.tar.bz2releases (GNU coreutils, many SourceForge mirrors, older Linux kernel snapshots from kernel.org's archive), keeping.tb2matches the project's historical artifacts. - Tooling that recognizes
.tb2shorthand — the.tb2and.tbz2extensions are an alias for.tar.bz2, andtar --auto-compress(tar -a) selects bzip2 when it sees them. Useful when a 12-character extension limit (legacy DOS-style scripts, some S3 lifecycle filters) won't accept.tar.bz2. - Mirror parity — if you maintain a download mirror that distributes both
.tar.gzand.tar.bz2but upstream switched to.tar.xz, batch-converting back to.tb2keeps your existing index pages, checksum files, and package manifests valid. - Forensics & cold storage — bzip2's block-based architecture (100–900 KB blocks) means a single-block corruption only affects that block; xz streams without
--block-sizecan lose more on partial damage. For long-term archival to media that may bit-rot, some teams still prefer bzip2.
TAR.XZ vs TB2 (TAR.BZ2) — Format Comparison
| Property | TAR.XZ | TB2 / TAR.BZ2 |
|---|---|---|
| Container | POSIX tar | POSIX tar |
| Stream compressor | LZMA2 (xz format, spec finalized Jan 2009) | bzip2 (released 1997, Julian Seward) |
| Algorithm family | Lempel–Ziv–Markov chain | Burrows–Wheeler transform + Huffman |
| Typical ratio on text/source | Best (≈14% of original at xz -6 on a Linux kernel benchmark) | Strong (≈17% at bzip2 -9 on the same benchmark) |
| Compression speed | Slowest of the three GNU defaults | ≈4–5× faster than xz at default levels |
| Decompression speed | ≈2× faster than bzip2 | Slower than xz decompress; CPU-bound |
| Memory footprint | High (xz -6 needs ~96 MB to compress, ~8 MB to decompress) | Low (≤8 MB regardless of level) |
| Multithreading | xz -T parallel since xz-utils 5.2 (2014) |
Single-threaded in stock bzip2; pbzip2/lbzip2 are third-party |
| Block-level error resilience | Stream-oriented; single damage can cascade | Block-isolated (100–900 KB blocks) |
| Conventional extensions | .tar.xz, .txz |
.tar.bz2, .tbz2, .tb2 |
| First-class GNU tar flag | -J (since tar 1.22, 2009) |
-j (since tar 1.15, 2004) |
Source for the ratio/speed figures: a published gzip-vs-bzip2-vs-xz benchmark on a 580 MB Linux kernel source tarball; results vary by content type — binary payloads compress less aggressively than source code.
Bzip2 Compression Level Quick Guide
bzip2 accepts -1 through -9, which sets the block size (100 KB through 900 KB). xconvert's TB2 output uses the standard bzip2 default (-9, the maximum block size) so the file behaves like archives produced by tar -cjf or tar --bzip2.
| Level | Block size | Typical use |
|---|---|---|
-1 |
100 KB | Streaming on very memory-constrained devices (~2 MB total RAM at decompress) |
-5 |
500 KB | Balanced; rarely chosen explicitly |
-9 (default) |
900 KB | What tar -j and bzip2 file use; best ratio bzip2 can produce |
Decompression always needs roughly 4× the block size in RAM, so a -9 archive needs ~3.7 MB to extract — still trivial on modern hardware but worth knowing for embedded targets.
Frequently Asked Questions
Will the output .tb2 be larger than the original .tar.xz?
Almost always, yes. At default levels (xz -6 vs bzip2 -9), xz compresses about 15–20% more tightly than bzip2 on source-code-style payloads, so expect the .tb2 to be roughly 15–25% larger than the .tar.xz you uploaded. Binary blobs, pre-compressed media, or already-encrypted data will show a much smaller delta because neither algorithm can compress incompressible data.
Is .tb2 the same thing as .tar.bz2 and .tbz2?
Yes — .tb2, .tbz, .tbz2, and .tar.bz2 are all aliases for the same format: a tar archive run through the bzip2 stream compressor. GNU tar's --auto-compress and most extractors (7-Zip, The Unarchiver, file-roller, Keka) recognize all four. The shorter forms exist because some legacy filesystems and tools dislike double extensions or extensions longer than three characters.
Do I need to install bzip2 to open the result?
On macOS, Linux, and BSD, bzip2 and bunzip2 are usually preinstalled; if not, they're in every distribution's base repository (apt install bzip2, dnf install bzip2, brew install bzip2). On Windows, 7-Zip, WinRAR, and PeaZip all open .tb2/.tar.bz2 natively. You do not need to install xz-utils to extract the converted file — that's the main reason this conversion exists.
Why does this conversion take longer than I expected?
Two compression steps run back-to-back. The server first has to fully decompress the LZMA2 stream (memory-intensive at xz -6) and then re-compress the tar payload through bzip2 (CPU-intensive, single-threaded). On a 1 GB .tar.xz of source code, expect total wall time on the order of a few minutes; on the same archive of already-compressed media it's faster because bzip2 gives up quickly on incompressible blocks.
Will the file timestamps, permissions, and symlinks be preserved?
Yes. The tar container itself is untouched — only the outer compression stream is swapped. POSIX permissions (mode bits), ownership UIDs/GIDs, mtime timestamps, symlinks, hard links, and sparse-file metadata pass through unchanged. If the original .tar.xz was a pax-format tarball, extended attributes and ACLs encoded as pax headers are also preserved.
Can I go back the other way later?
Yes — use TB2 to TAR.XZ or the equivalent TAR.BZ2 to TAR.XZ page to re-encode the archive with LZMA2. The tar payload is identical in both directions, so a round trip (.tar.xz → .tb2 → .tar.xz) produces a byte-identical tar listing; only the outer compression frames change.
What's the difference between .tb2 and converting straight to .tar.bz2?
Functionally there is none — .tb2 and .tar.bz2 are the same bytes; only the filename changes. We expose both TAR.XZ to TAR.BZ2 (long extension) and TAR.XZ to TB2 (short alias) because some downstream tools — older DOS-derived scripts, certain S3 lifecycle rules, mirror indexers — match on the literal extension string and won't pick up .tar.bz2 if they're configured for .tb2.
Is there a file-size cap on the upload?
Yes. Free uploads are limited to 400 MB per file; large archives (multi-gigabyte source-code dumps) exceed the cap. If you need to convert a very large .tar.xz, upgrade or split the archive into chunks first with split -b 350M archive.tar.xz part_ and convert the reassembled file in pieces. The conversion is also exposed as part of the broader Archive Converter which accepts any supported archive container as input.
Should I use .tar.xz or .tb2 for new releases I'm publishing today?
For projects targeting modern systems with xz-utils installed (every current Linux distro, macOS 10.15+, recent BSDs), .tar.xz is the better choice — smaller downloads and faster decompression. Keep .tb2/.tar.bz2 for compatibility with downstream consumers that haven't updated their tooling, or for build environments where you need to guarantee decompression works without optional packages. The Linux kernel itself ships both formats from kernel.org for exactly this reason.