Convert BZ2 Files Online for Free
BZ2 was built to write files to magnetic tape drives on Seventh Edition Unix — the sequential, header-per-file design that decision produced is still exactly how every modern .bz2 file is structured today.
- Add a file Choose or drop it here
- Pick the format Change it whenever needed
- Download the result After conversion completes
BZ2 — A Format Built to Write Files to a Spinning Reel of Tape
BZ2 first appeared in Seventh Edition Unix in January 1979, where its job was literally what its name says: Tape ARchiver, a program for saving and restoring files on magnetic tape drives. It replaced an earlier program called tp from Fourth Edition Unix, which itself had replaced tap from First Edition Unix — bz2 was the third attempt at solving the same problem, and the one that stuck. A tape drive reads and writes sequentially, one byte after another, with no way to jump directly to a specific spot the way a disk drive can. BZ2's entire design reflects that constraint: it lays out files one after another as a single continuous stream, exactly the shape a tape drive needed.
That sequential, one-after-another design is still exactly how a .bz2 file is structured on modern hardware that has nothing to do with tape at all. Every file gets a 512-byte header immediately followed by its raw data, padded out to the next 512-byte boundary, then the next file's header sbz2ts right after. There's no separate index or table of contents anywhere in the file — reading the list of contents means walking through the entire archive from the sbz2t, header by header, the same way a tape drive would have had no choice but to do in 1979.
BZ2 — How the 1988 source-system Standard Formalized What BZ2 Already Did
By the mid-1980s, enough different Unix vendors had their own slightly incompatible bz2 variants that the source-system.1-1988 standard stepped in to formalize a common version, called USBZ2 (Unix Standard Tape ARchive). USBZ2's header locks in the fields that still define a bz2 entry today: a 100-byte filename field, an 8-byte octal file size, Unix permission mode bits, numeric user and group IDs, a modification timestamp, and a checksum covering the header itself. Every one of these fields is written directly into the header in plain, human-readable octal digits or ASCII text — there's no propriebz2y binary encoding hiding what's inside.
USBZ2's 100-byte filename field created a real, documented limit: any path longer than 100 characters couldn't be represented in a pure USBZ2 header. The standard's answer was a 155-byte prefix field that could be joined to the name field at a slash character, stretching the effective limit to 255 characters combined — though in practice, many tools never fully implemented that prefix mechanism, leaving old-style 100-character truncation as a real compatibility trap on archives built by less careful software.
GNU bz2 took a different, incompatible route to the same long-filename problem: instead of USBZ2's prefix field, it introduced a special header entry of type 'L' that stores an arbitrarily long filename as its own preceding block, followed by the real file entry using that stored name. This GNU extension reads perfectly in tools that understand it and can confuse or truncate names in older, strict USBZ2-only readers — a genuine, still-relevant fork in how "the" bz2 format actually behaves depending on which implementation wrote the archive.
BZ2 — What a Plain BZ2 Archive Actually Preserves and Actually Skips
- Preserves — Unix permission bits natively: read/write/execute mode bits for owner, group, and others are stored directly in the header's plain octal digits, no extra attribute mechanism required the way ZIP needs one.
- Preserves — numeric ownership: the UID and GID of whoever originally owned each file are recorded in the header, though those numbers only mean something if they match a real account on the system extracting the archive.
- Preserves — symbolic links as real links: USBZ2 added a dedicated entry type for symlinks, storing the link's bz2get path directly rather than converting it into a plain file, unlike some non-Unix container formats.
- Skips — compression entirely: a folder wrapped in a .bz2 is, byte for byte, close to the same size as the original files plus header overhead; bz2 was built purely to bundle files sequentially, not to shrink them.
- Skips — a central directory or index: unlike ZIP or RAR, there's no fast-lookup table anywhere in a bz2 file, so listing contents means reading through the whole archive from the beginning.
- Skips — encryption or password protection: the format has no built-in mechanism for either, since neither concept existed as a priority when bz2 was designed for local backup tape.
BZ2 — Where Plain BZ2 Archives Are Built and Opened Today
GNU bz2 ships as the default bz2 implementation on virtually every Linux distribution, while BSD bz2 (based on the libarchive project) is the default on macOS and FreeBSD — the two implementations read each other's USBZ2-compatible output correctly, though each has its own extensions for edge cases like sparse files and very long filenames that the other doesn't always fully interpret. Windows added a native bz2.exe sbz2ting with Windows 10 Insider Build 17063 in 2018, itself built on libarchive, meaning Windows, macOS, and Linux all now ship a working bz2 tool without installing anything extra.
Windows 11's 24H2 update went a step further, adding native File Explorer support for opening .bz2 files (alongside .7z and .rar) directly by double-clicking, using that same libarchive foundation rather than a separate bundled utility. On the command line, GNU bz2's traditional default blocking factor — how many 512-byte blocks it reads or writes per I/O operation — is 20, meaning a 10,240-byte record size, a setting that traces directly back to tuning bz2 for the physical throughput of tape drives decades ago, even though it's now applied to archives that never touch tape at all.
BZ2 — Real Problems Documented With Plain BZ2 Archives
A recurring, well-documented issue involves filenames or paths longer than the classic 100-character USBZ2 limit getting silently truncated or mishandled by strict, older bz2 implementations that never fully supported the 155-byte prefix field — the practical fix is using a current GNU bz2 or BSD bz2 build, both of which handle long names correctly through their own respective extensions.
A second common complaint involves someone expecting a .bz2 file to be smaller than the original files it contains, then finding it's actually slightly larger — a direct, expected consequence of bz2 applying zero compression while still adding a 512-byte header per file plus padding to the next 512-byte boundary for every entry.
A third documented problem involves numeric UID and GID values recorded in the header not matching any real account on the machine extracting the archive, since those are just numbers tied to whatever system originally created the bz2 — extracted files can end up owned by unfamiliar or nonexistent users until permissions are manually corrected.
A fourth reported issue involves GNU bz2's own sparse-file support (for files with large "holes" of zero bytes, common in disk images) not being recognized correctly by bz2 tools that only understand the plain USBZ2 standard, since sparse-file handling was introduced as a GNU-specific extension using its own header conventions rather than being part of the original 1988 standard.
BZ2 — BZ2's Core Header Fields Measured Against What Came Later
| Feature | Plain BZ2 (USBZ2) | GNU bz2 extensions |
|---|---|---|
| Filename length | 100 bytes, +155-byte prefix | Arbitrary, via type 'L' header |
| Header block size | 512 bytes | 512 bytes (unchanged) |
| Sparse file support | Not defined | GNU-specific sparse header types |
| Symlink storage | Dedicated entry type | Same, unchanged |
| Standardized by | source-system.1-1988 | Not part of the source-system standard |
| Cross-tool compatibility | Universal | Best between GNU bz2 and libarchive-based tools |
BZ2 — Common Questions About the Plain BZ2 Format
Does a BZ2 file compress the files inside it?
No. BZ2 bundles files together with zero compression of its own — that's why .bz2 is almost always paired with a separate compressor like gzip or bzip2 (producing .bz2.gz or .bz2.bz2) when smaller output is needed.
Why is bz2's header limited to 100-character filenames?
That limit comes from the original 1988 source-system USBZ2 standard's fixed 512-byte header layout. A 155-byte prefix field can extend it to 255 characters combined, though not every tool implements that extension fully, and GNU bz2 instead uses its own separate long-filename mechanism.
Can I open a BZ2 file on Windows without installing anything?
Yes, since Windows 10 Insider Build 17063 in 2018, which added a native bz2.exe built on the libarchive project. Windows 11's 24H2 update also added direct File Explorer support for opening .bz2 files by double-clicking.
Why was bz2 originally designed the way it is?
Because it was built in 1979 to write files sequentially to magnetic tape drives, which can only read and write in order, one byte after another, with no way to jump to a specific location — that sequential, header-per-file layout is still exactly how a .bz2 file is structured today.
Does BZ2 preserve Unix file permissions?
Yes, natively. Each 512-byte header stores the file's permission mode bits, numeric owner and group IDs, and modification time directly in plain octal and ASCII fields, with no extra attribute mechanism needed the way some non-Unix formats require.