Skip to content

BZ2 File Format (.bz2)

A BZ2 file is a single stream compressed with Julian Seward's bzip2, which sorts each 100-900 KB block through a Burrows-Wheeler transform before Huffman coding it, trading compression speed for a smaller result than DEFLATE typically achieves.

.bz2Archives

BZ2 at a glance#

Full namebzip2 compressed archive
File extension.bz2
CategoryArchives
DeveloperJulian Seward
First released1996
MIME typesapplication/x-bzip2
CompressionLossless
FileFlip supportFileFlip reads and writes this format

What a .bz2 file can hold#

These are the things a BZ2 file either supports or does not, and they are what decides whether a conversion keeps everything or quietly drops something.

StreamingYes

Strengths and limitations of BZ2#

What BZ2 does well

  • Compresses noticeably smaller than gzip on the same data, especially text-heavy input
  • Its block-based design lets multithreaded tools like pbzip2 compress separate blocks in parallel, something gzip's stream-oriented DEFLATE resists

Where BZ2 falls short

  • Compression is markedly slower than gzip, often cited at up to four times the time and memory
  • Compresses a single file or stream only, so archiving several files needs tar first
  • Generally beaten by xz on both compression ratio and decompression speed today

Use BZ2 for text-heavy data where its tighter compression than gzip is worth the slower compression time.

Convert BZ2 to XZ when an even smaller archive is worth the additional compression time, or to GZ when compression speed matters more than ratio.

How to open a .bz2 file#

A .bz2 file opens in the programs below, grouped by the platform you are on. If you would rather not install anything, FileFlip converts BZ2 into a format your machine already opens, and it does it in the browser tab rather than on a server.

PlatformPrograms that open it
Windows7-Zip, WinRAR
macOSArchive Utility
LinuxArchive Manager (File Roller), bzip2 (terminal)
WebFileFlip

BZ2 questions people ask#

Is bzip2 better than gzip?

bzip2 usually compresses noticeably smaller than gzip, especially on text, because its Burrows-Wheeler transform finds redundancy that DEFLATE misses. The cost is speed: bzip2 compression is markedly slower and needs more memory, sometimes cited at up to four times gzip's.

Can bzip2 hold more than one file?

No, bzip2 compresses a single file or stream just like gzip, so archiving several files as .bz2 means tarring them first into a .tar.bz2, or .tbz2.

Why does bzip2 compress in blocks?

bzip2 splits its input into blocks of 100 KB to 900 KB and runs the Burrows-Wheeler transform, move-to-front coding and Huffman coding on each block independently. That block structure is also what lets tools like pbzip2 compress a bzip2 file's blocks in parallel across multiple CPU cores.

Is bzip2 still worth using over xz?

For most jobs, no: xz built on LZMA2 usually compresses smaller than bzip2 and decompresses faster, which is why most Linux distributions moved their package compression from bzip2 to xz. bzip2 still shows up in older tooling and pipelines that were built around it.

Converting BZ2 files#

Every conversion runs inside your browser. The file is read from your disk, the work happens on your own machine, and nothing is uploaded. How FileFlip works names the engine behind each family and how to verify that for yourself.