.BZ2

BZ2 File

bzip2 Compressed File
Ask a question
QUICK ANSWER

A BZ2 file is a single file compressed with the bzip2 tool. On Windows, open it with the free 7-Zip or PeaZip. On macOS, double-click and Archive Utility handles it. On Linux, run bunzip2 file.bz2 or tar -xjf file.tar.bz2. Most BZ2 files you encounter are actually .tar.bz2 archives containing many files inside a TAR layer.

Developer: Julian Seward (bzip2) Category: Compressed Files Open standard MIME: application/x-bzip2
OPENS ON Windows macOS Linux Android
Related: .RAR · .ZIP · .Z01 · .7Z

On this page

19k+ extensions indexed
Last reviewed Aug 3, 2026

Not sure what your file is?

Drop any file into our identifier - we read just the first bytes to name the format.

Identify a file

What is the BZ2 file format?

.bz2 is a compressed file format produced by the bzip2 utility. Unlike a full archive, it compresses a single file or data stream - when multiple files need packaging, they are first bundled into a TAR archive and then compressed together, producing the .tar.bz2 (or .tbz2) packages seen across Linux distributions and open-source projects.

What data does a .bz2 file contain?

.bz2 files store data compressed using a pipeline of lossless algorithms:

  • Burrows-Wheeler Transform (BWT) - reorganizes data blocks to cluster repeated byte sequences
  • Move-to-front transform - exploits the locality produced by BWT
  • Run-length encoding (RLE) - collapses long runs of identical bytes
  • Huffman coding - entropy-codes the resulting symbol stream

Block sizes range from 100 KB to 900 KB and are selected at compression time; the default bzip2 command uses 900 KB blocks (file signature BZh9). Each block carries its own CRC-32 checksum, and a second stream-level CRC covers the whole file. The bzip2recover utility can salvage intact blocks from a partially damaged archive.

.bz2 on Unix-like systems

.bz2 files are typically found on Linux, macOS, and other Unix-like environments, where bzip2 and bunzip2 are standard CLI tools. The format is widely used for distributing software source code on such platforms.

Windows support

On Windows, .bz2 files are supported by tools such as 7-Zip, WinRAR, and PeaZip. The bzip2 utility itself is also available as an open-source Windows build. Compared to .gz files, .bz2 typically achieves a better compression ratio on text and source code, at the cost of slower compression and decompression. Newer formats such as .xz now often surpass bzip2 in both compression ratio and speed, but .tar.bz2 packages remain widely used in open-source software distribution. .bz2 files can also serve for creating backup copies of various data, such as picture collections or document libraries.

Security & safety

RISK: LOW

The bzip2 format is open and safe, and a .bz2 is just compressed data that can't run on its own. The usual archive cautions apply: a .bz2/.tar.bz2 from an untrusted source can contain executables or scripts revealed only after extraction, so scan the contents before running anything. Two technical notes: a tiny .bz2 can expand enormously ('decompression bomb') - be wary of suspiciously small archives; and a .tar.bz2 can contain '../' paths (path-traversal / 'tar slip'), so extract untrusted tarballs into an empty folder. Modern extractors guard against both.

Format details

in a nutshell
FULL NAMEbzip2 Compressed Fileaka bzip2 archive, BZ2 file
DEVELOPERJulian Seward (bzip2)since 1996 (bzip 0.21); bzip2 1.0 released 2000
MIME TYPEapplication/x-bzip2
TYPESingle-stream compressed file (Burrows-Wheeler transform + Huffman coding)
STANDARDOpen · royalty-free
MAGIC BYTES · FILE SIGNATURE
OFFSET
000102
HEX
425A68
ASCII
BZh
Fixed signature 42 5A 68 ("BZh") at offset 0, followed by an ASCII digit '1'-'9' giving the block size in hundreds of KB (e.g. "BZh9" = 900 KB blocks, the default). The next bytes are a compressed-block magic (pi: 31 41 59 26 53 59). Like gzip, plain bzip2 compresses ONE stream, so multi-file archives appear as .tar.bz2 (or .tbz2/.tbz).

Programs that open BZ2 files

Windows3 apps
WinRAR Paid Double-click to open and Extract; handles .bz2 and .tar.bz2 in one pass. (7-Zip/PeaZip are the free choices.)
7-Zip Open-source Right-click the .bz2 > 7-Zip > Extract Here. For .tar.bz2, extract twice (once to .tar, once to the files). Free; also creates .bz2.
PeaZip Open-source Open the .bz2/.tar.bz2 and Extract; handles the tar layer automatically in one step.
macOS3 apps
The Unarchiver Free Set as default for .bz2/.tar.bz2 and double-click to extract. Free on the Mac App Store.
Archive Utility (built-in) Built-in Double-click the .bz2 or .tar.bz2 in Finder - macOS decompresses (and untars) it automatically. No install needed.
Keka Free Drag the .bz2 onto Keka to extract; Keka also CREATES .bz2 and .tar.bz2 with options.
Linux2 apps
bzip2 / bunzip2 / tar (CLI) Open-source Single file: 'bunzip2 file.bz2'. Tarball: 'tar -xjf file.tar.bz2'. Pre-installed on essentially every Linux/Unix system.
Ark / File Roller / Xarchiver Open-source Default KDE/GNOME archive managers: open the .bz2/.tar.bz2 and Extract from the GUI.
Android1 app
ZArchiver Free Tap the .bz2/.tar.bz2 and Extract; handles the tar layer too. Also creates .bz2.

Technical details

deep spec
MIME typeapplication/x-bzip2 (also application/x-bzip, application/bzip2)
Magic bytes42 5A 68 ("BZh") at file offset 0, followed by an ASCII digit '1'-'9' encoding the block size (e.g. BZh9 = 900 KB blocks)
EncodingBinary - bit-packed compressed stream
Compression pipelineBurrows-Wheeler Transform → move-to-front → run-length encoding → Huffman coding (all lossless stages)
Block sizeSelectable from 100 KB (level 1) to 900 KB (level 9); default is 900 KB; larger blocks improve ratio but require more RAM
Memory usageCompression: approximately 10× the block size; decompression: ~3.5 MB regardless of block size chosen
Integrity checkingCRC-32 checksum per compressed block plus a combined stream-level CRC verified on decompression
Block markerEach BWT block begins with the 48-bit pi constant 0x314159265359, used by bzip2recover to locate blocks in damaged files
Container modelStandalone compressed stream with no internal filename table or directory structure; multiple files need a TAR wrapper
Parallel compressionStandard bzip2 is single-threaded; pbzip2 and lbzip2 parallelize block-level compression on multi-core systems
Block recoverybzip2recover scans raw bytes for 48-bit block markers and writes each intact block to a separate recoverable .bz2 file
Compression ratio vs. gzipTypically 10-15% smaller than .gz on text and source code; decompression is 2-6× slower
Associated platformsLinux, macOS, Unix/BSD natively; Windows via 7-Zip, WinRAR, PeaZip; bzip2 CLI available for all major systems
Common use casesLinux/Unix source tarballs (.tar.bz2), software distribution packages, database dumps, and compressed log archives
Released1996 (bzip 0.21); bzip2 1.0 released 2000
Latest versionbzip2 1.0.8 (2019); format itself unchanged
Open standardYes · royalty-free
Specificationsourceware.org

BZ2 conversions

Community Q&A

asked by users
Ask a quick question
Get help from people who work with BZ2 files. Be specific - include your system and software version.
No account needed · answers usually within a day

No questions yet - be the first to ask about BZ2 files.

Frequently asked questions

How do I open a BZ2 file?
On Windows use 7-Zip or PeaZip (right-click > Extract). On macOS just double-click it (Archive Utility handles it) or use Keka. On Linux run 'bunzip2 file.bz2', or 'tar -xjf file.tar.bz2' for a tarball.
What's the difference between .bz2 and .tar.bz2?
A plain .bz2 compresses a SINGLE file. A .tar.bz2 (or .tbz2) is many files first bundled into one .tar archive, then bzip2-compressed - that's why most Linux/source downloads are .tar.bz2.
BZ2 vs GZ - which is better?
bzip2 usually compresses text/source tighter than gzip but is slower; gzip is faster and the default for HTTP/streaming. Newer xz and zstd often beat both. Use whatever your source provides - the tools open all of them.
How do I open a BZ2 file on Windows?
Windows Explorer doesn't open .bz2 natively, so install the free 7-Zip or PeaZip. Right-click the file > 7-Zip > Extract Here. For .tar.bz2 you may extract twice (bz2 then tar).
Why is my BZ2 file only one file when I expected many?
Because bzip2 compresses just one stream. Multiple files are packaged as .tar.bz2: the .tar holds all the files and bzip2 compresses it. Extract the bz2 to get the .tar, then extract the .tar.
Can I create a BZ2 file for free?
Yes - bzip2 is open, so 7-Zip, PeaZip and Keka all create .bz2/.tar.bz2 for free, and Linux/macOS have 'bzip2'/'tar' built in.

References

1bzip2 - official site and manual (Sourceware)sourceware.org
2Wikipedia - bzip2 (algorithm and format)en.wikipedia.org

Keep exploring

across the database

Top extensions this week

1.AQQAQQ Instant Messenger File
2.CRDOWNLOADChrome Partial Download File
3.MDMarkdown Document
4.BCBitComet Incomplete Download File
5.PARTPartial Download File
6.BINCD/DVD Disc Image (BIN/CUE)
7.EXEWindows Executable (Portable Executable)
8.AVIFAV1 Image File Format (AVIF)
9.RPMSGRestricted Permission Message
10.NOMEDIAAndroid No-Media Marker File

Related extensions

.RARRAR Archive (Roshal ARchive)
.ZIPZIP Archive
.Z01Split ZIP Archive - First Part
.7Z7-Zip Archive
.001Split / multi-volume archive - first part (.001)
.ZIRenamed / Truncated ZIP Archive

Free file tools

An in-browser file identifier and image converter - everything runs on your device.

Open the toolbox

Browse file extensions A-Z