Bzip2 File Signature & Magic Bytes (.bz2)
Bzip2 compresses single streams using the Burrows-Wheeler block-sorting transform and Huffman coding. Every Bzip2 stream starts with the 3-byte ASCII prefix BZh (42 5A 68) followed immediately by an ASCII digit 1–9 (0x31–0x39) indicating the 100 KB–900 KB block size (most commonly BZh9) and block magic 31 41 59 26 53 59 (digits of pi).
Signature & identification summary
| Detected format name | Bzip2 archive |
|---|---|
| Hexadecimal magic bytes | 42 5A 68 |
| ASCII / marker preview | BZh |
| Byte offset | 0 |
| MIME type | application/x-bzip2 |
| Common extensions & aliases | .bz2, .tbz, .tbz2 |
Check whether your file really is Bzip2.
Drop any file into File Sniff’s free local browser checker to verify its 42 5A 68 signature and spot misleading extensions—without uploading a single byte.
Container & byte-layout notes
Like Gzip, Bzip2 wraps a single stream and is routinely paired with TAR as .tar.bz2 or .tbz2 for source releases and database dumps.
Extension mismatches & common pitfalls
Database backups and open-source datasets downloaded via curl or browser redirects occasionally lose their .bz2 suffix; seeing BZh9 at offset 0 identifies the compression immediately.
Which apps open Bzip2 files?
| Platform | Compatible applications & tools |
|---|---|
| Mac (macOS) | Archive Utility, bzip2 / tar in Terminal, Keka, The Unarchiver |
| iPhone & iPad | Files app, Keka |
| Windows | Windows 11 File Explorer, 7-Zip, PeaZip, tar in PowerShell |
Free local tools & related guides
- Check whether a file really is Bzip2
- Inspect raw bytes in the Hex Viewer
- Guide: File Signatures & Magic Bytes Guide
Inspect files & folders natively
on Mac, iPhone & iPad.
The native File Sniff app scans entire folders, spots extension mismatches, repairs extensions with Undo on Mac, and exports CSV or JSON reports locally.