Initializing... drag & drop files here
Supports: TB2
.tb2 (or .tbz, .tbz2, .tar.bz2) archive, or click "+ Add Files" to browse. Batch uploads are supported — queue several archives in one session..tgz). Switch to Individual Archives to produce a separate .tgz per uploaded file — useful when you want each source archive repackaged independently rather than bundled together..tgz file is ready to download — no sign-up, no watermark, no email gate.TB2 (also written .tbz, .tbz2, or .tar.bz2) is a tar archive compressed with bzip2, while TGZ (.tar.gz) is the same tar archive compressed with gzip. Bzip2 squeezes files slightly smaller, but gzip decompresses several times faster on the same hardware — and gzip is multi-decade ubiquitous across Linux, macOS, BSD, Docker base images, and CI runners. Switching from .tb2 to .tgz is almost always about extraction speed and tooling compatibility, not storage savings.
.tb2 artifacts for .tgz typically cuts decompress time on the order of 3-4x on the same CPU, shaving real minutes off pipelines that unpack a few hundred MB.Dockerfile ADD/COPY flows and base images (Alpine, Debian, Ubuntu) ship gzip/gunzip by default; bzip2 is sometimes absent on minimal images, forcing a apt-get install bzip2 layer you can avoid by shipping TGZ..tgz (npm) or .tar.gz (PyPI sdist). Converting .tb2 mirrors to .tgz matches the format consumers' tooling already expects.Content-Encoding: gzip is supported by every browser; serving a .tgz saves a round-trip vs. forcing visitors to install a bzip2 utility..tb2 mirrors to .tgz keeps them compatible with current package-fetcher defaults.| Property | TB2 (tar.bz2) |
TGZ (tar.gz) |
|---|---|---|
| Compression algorithm | bzip2 (Burrows-Wheeler + Huffman, 1997) | DEFLATE / gzip (LZ77 + Huffman, 1992) |
| Underlying container | POSIX tar | POSIX tar |
| Typical compression ratio (text/source) | ~10-15% smaller than gzip | Baseline |
| Decompression speed | Slower (single-threaded reference impl) | Roughly 3-4x faster on the same CPU |
| Compression speed | Slower at default level | Faster at default level |
| Multi-threaded variant | lbzip2, pbzip2 |
pigz |
| Default tar flag | tar -jcf / tar --bzip2 |
tar -zcf / tar --gzip |
| Default presence on minimal Docker images | Sometimes missing | Almost always present |
| Aliases / extensions seen in the wild | .tb2, .tbz, .tbz2, .tar.bz2 |
.tgz, .tar.gz, .taz |
| Preserves Unix permissions, symlinks, ownership | Yes | Yes |
Gzip supports compression levels -1 (fastest) through -9 (smallest). Most tar tools use -6 as the default. Numbers below are typical for source-code and text-heavy payloads — your mileage varies for already-compressed binaries.
| Level | Speed | Ratio (relative to -6) |
When to use |
|---|---|---|---|
-1 (--fast) |
Very fast | ~5-10% larger | Streaming logs, real-time pipelines |
-6 (default) |
Balanced | Baseline | General-purpose archives, npm/PyPI publishes |
-9 (--best) |
Slower | ~2-5% smaller | One-time releases, long-term distribution mirrors |
Yes. Only the outer compression layer changes — bzip2 is swapped for gzip. The inner tar stream (filenames, Unix permission bits, symlink targets, UID/GID, mtime) is preserved byte-for-byte. Extract the resulting .tgz with tar -xzf and you should see the same tree you'd get from tar -xjf on the original .tb2.
.tgz slightly larger than the original .tb2?That's expected. Bzip2 typically compresses text and source code about 10-15% tighter than gzip because it uses a Burrows-Wheeler block-sort transform before Huffman coding, while gzip uses LZ77 with a sliding window. The tradeoff: gzip decompresses much faster, which is usually what you want for CI artifacts, Docker layers, and package distribution. If maximum compression matters more than speed, look at TB2 to TAR.XZ — xz typically beats both.
.tb2 different from .tbz, .tbz2, and .tar.bz2?They're the same format with different file-name conventions. .tar.bz2 is the long form. .tbz2 is a common short form. .tbz and .tb2 are older short forms used on filesystems that historically limited extensions to three characters. All four are bzip2-compressed tar archives and our converter accepts every variant.
.tgz natively on Windows, macOS, and Linux?Yes on all three. Linux and macOS have shipped tar with built-in gzip support for decades — tar -xzf file.tgz just works. Windows 10 added native tar to the command line in Build 17063 (released October 2017) and the built-in tool handles .tgz without extra software. Older Windows versions need 7-Zip, PeaZip, or WinRAR — all free or freemium.
Use TGZ in nearly every CI scenario. Gzip decompression is roughly 3-4x faster than bzip2 on the same CPU, and Docker base images (Alpine especially) often ship gzip but not bzip2. The few MB of extra archive size is almost always cheaper than the seconds you spend decompressing it on every build. For one-time release downloads where total bytes-on-the-wire dominates, TB2 (or better, TAR.XZ) still has a case.
Our online converter does it in one step — upload your .tb2, click Convert, download the .tgz. From the command line on Linux/macOS you can pipe: bzcat archive.tb2 | gzip -c > archive.tgz. That avoids creating a temporary directory and is the fastest local approach.
.tb2 files at once?You control the merge behavior in step 2. Single Archive mode concatenates the contents of all uploaded archives into one combined .tgz (handy for shipping a release bundle). Individual Archives mode produces one .tgz per input, repackaging each .tb2 independently — pick this when each source archive should stay separate. For the reverse direction see TGZ to TB2.
Yes. The conversion is lossless because the inner tar stream is untouched. If you ever need to go back, run TGZ to TB2 and you'll get the same files with the same metadata, just re-wrapped in bzip2. If you also want to look inside the archive without converting, our Extract TB2 tool lists and unpacks contents directly.
Kernel.org formally dropped bzip2 tarballs on December 27, 2013, citing the speed gap and the rise of xz, which compresses tighter than bzip2 while still decompressing quickly. They kept gzip (.tar.gz) alongside xz (.tar.xz) until 2018 before going xz-only for new releases. Most other Linux distributions and open-source projects followed a similar arc — gzip remained the broad-compatibility default, xz became the high-compression default, and bzip2 was retired from the mainstream.