How to Re-pack a TZ2 Archive Online
- Upload Your TZ2 File: Drag and drop or click "+ Add Files" to load one or more
.tz2archives. Batch uploads are supported — re-pack a whole folder of Linux source tarballs in one pass. - Choose Combine Mode: Use Single Archive to bundle every uploaded file into one merged
.tz2, or Individual Archives to produce a separate.tz2per input. For pure re-packing, leave it on Individual Archives so each source maps to one output. - Confirm the Output Extension (Optional): The output stays
.tz2(tar + bzip2). If you want a different container — gzip, xz, 7z, or zip — switch to one of the related converters linked below instead. - Re-pack and Download: Click "Convert" and download each rebuilt
.tz2. Files process on our servers — no sign-up, no account, no watermark.
Why Re-pack a TZ2 Archive?
A .tz2 file is a tar archive compressed with bzip2 — the same payload as .tar.bz2 and .tbz2, just with a short DOS-friendly extension that survived the 8.3 filename era. Re-packing a .tz2 to .tz2 looks redundant, but there are real reasons to do it:
- Normalise mixed archive contents. If a tarball has accumulated
.DS_Store,Thumbs.db, editor swap files, or stray__MACOSX/folders, extracting and re-packing produces a clean archive — handy before publishing source releases or distributing to colleagues on different OSes. - Repair a flaky download. If
bzip2 -tvv archive.tz2reports CRC errors on a few blocks but most of the data is intact, re-packing the recovered files yields a verifiable archive you can trust. - Merge multiple
.tz2files into one. Combine Mode = Single Archive concatenates several uploads into one bundle, useful when a project ships its docs, source, and binaries as three separate tarballs and you want a single download. - Split one archive into per-file archives. The reverse: Combine Mode = Individual Archives turns a multi-file
.tz2into one.tz2per top-level entry, convenient when distributing samples or test fixtures separately. - Refresh archive metadata. Modification timestamps, owner UIDs, and POSIX extended headers get rewritten on re-pack — handy when stripping personal info before sharing publicly, or aligning timestamps for reproducible builds.
- Standardise on
.tz2over.tar.bz2or.tbz2. All three extensions name the same format, but some Windows tools, build pipelines, or upload forms accept only one. Re-packing lets you settle on whichever extension your toolchain expects.
Need a different output instead? See TZ2 to TAR.XZ for tighter LZMA2 compression, TZ2 to ZIP for Windows-friendly distribution, TZ2 to TGZ for faster gzip-based compression, or Extract TZ2 if you just want the files out. Starting from a plain tarball? TAR to TZ2 compresses it.
TZ2 vs TBZ2 vs TAR.BZ2 — Same Format, Different Extensions
| Extension | What it means | Common on | Notes |
|---|---|---|---|
.tar.bz2 |
tar archive piped through bzip2 | Linux, macOS, GNU toolchains | The canonical, fully-explicit form |
.tbz2 |
Same payload, short form | Cross-platform downloads | Avoids the double dot for older Windows tools |
.tbz |
Same payload, shorter form | BSD ports, some Linux distros | Sometimes ambiguous with .tar alone |
.tb2 |
Same payload, 8.3-compatible | Legacy Windows / DOS-era tools | Rare today |
.tz2 |
Same payload, 8.3-compatible | Legacy Windows / DOS-era tools | Effectively a .tbz2 alias |
All five extensions are interchangeable to GNU tar (it sniffs the bzip2 magic bytes regardless), so renaming a .tz2 to .tar.bz2 and back changes nothing about the contents. The choice is purely cosmetic and pipeline-driven.
bzip2 Compression Levels — What Your Tool Picked
Compression level is set at create time and baked into the archive; you can only change it by re-packing (which this tool does). The bzip2 reference defines nine block-size levels:
| Flag | Block size | Memory (compress) | Speed vs default | Typical use |
|---|---|---|---|---|
-1 (--fast) |
100 KB | ~1.7 MB | Fastest; ~20% larger output | Embedded systems, tiny RAM budgets |
-3 |
300 KB | ~3 MB | Faster; ~5–10% larger | Older hardware, quick backups |
-6 |
600 KB | ~6 MB | Modest speedup | Balanced; what gzip defaults to (not bzip2) |
-9 (--best, default) |
900 KB | ~7.6 MB | Reference | The bzip2 default and what nearly every .tz2 in the wild uses |
--best is just an alias for the default; the bzip2 man page is explicit that --best "merely selects the default behaviour." Decompression ignores the level entirely — block size is encoded in the stream, so any .tz2 opens with the same bzip2 -d or tar -xjf regardless of how it was created.
For comparison: at default levels on a 580 MB Linux kernel source tree, bzip2 -9 finishes in ~83 seconds and reaches a 16.6% compression ratio, versus gzip -6 at ~31 seconds and 21.3% (worse compression, faster) and xz -6 at ~383 seconds and 14.4% (best compression, slowest). If size matters more than CPU time, convert to TZ2 to TAR.XZ; if speed matters more, TZ2 to TGZ.
Frequently Asked Questions
What is a .tz2 file actually?
.tz2 is a tar archive that has been compressed with bzip2 — byte-for-byte the same format as .tar.bz2 and .tbz2. The short extension dates back to the DOS 8.3 filename limit, where archive.tar.bz2 would have been mangled. Modern operating systems don't have the limit, but the .tz2 extension survived in some package ecosystems and download mirrors.
Why would I re-pack a .tz2 to .tz2 instead of just leaving it alone?
The common reasons are cleaning out junk files (.DS_Store, __MACOSX/, editor backups), merging several archives into one, splitting one archive into many, or refreshing metadata before redistribution. You'd also re-pack if the original was created at a non-default compression level and you want to standardise everything in a release at -9.
Will the re-packed file be smaller than the original?
Usually no — most .tz2 files in the wild are already at bzip2's default level 9, which is the maximum. Re-packing at the same level will produce a file within a few hundred bytes of the original (only tar header differences and timestamps). The exception is if the original was packed at -1 or -3 and your re-pack uses the default; you'll see a 5–20% reduction.
Does this tool let me pick the bzip2 compression level?
The current Advanced Options expose Combine Mode (Single Archive vs Individual Archives) and output extension. Bzip2's block-size level is set to the bzip2 default (-9, 900 KB block size). If you need a specific lower level, decompress with Extract TZ2 and re-pack locally with tar -I 'bzip2 -3' -cf out.tz2./files.
Can I convert a .tz2 to .tbz2 or .tar.bz2 without re-packing?
Yes — the file contents are identical. On Linux or macOS, mv archive.tz2 archive.tar.bz2 is a valid one-step rename. The re-pack route is only useful when you also want to clean contents, merge, or split. Some Windows download portals reject .tz2 outright because the MIME type isn't registered; renaming to .tar.bz2 usually fixes that without going through a converter.
Why does my .tz2 fail to open on Windows but works fine on Linux?
Windows doesn't ship a built-in bzip2 extractor. You need 7-Zip, WinRAR, or PeaZip. Renaming to .tar.bz2 doesn't help — the issue is the absence of a bzip2 codec, not the extension. If you can't install third-party tools, convert the file to TZ2 to ZIP and Windows Explorer will open it natively.
Is bzip2 still worth using in 2026, or should I switch to xz or zstd?
It depends on the consumer. Bzip2 is still the default in many Debian source packages and Linux kernel mirrors, and every Linux distro has bunzip2 preinstalled. xz typically achieves 10–15% better compression but takes 4–6x longer and uses more RAM during decompression; zstd is dramatically faster than both but isn't as universally pre-installed. For new projects, xz or zstd are usually better picks; for compatibility with existing tooling, stick with bzip2.
Are my files uploaded permanently?
No. files are processed on our servers and deleted automatically after a few hours. No sign-up, no account creation, no watermark, and no per-file count limits. The same applies to every other archive tool in the suite.