Bzip2 Decompressor
Decompress .bz2 files, Hex or Base64 in your browser and verify every block and stream CRC.
Input
No file chosen.
Stops at 128 MB of output, or at 200× the input size after 16 MiB.
Output
Related Tools
How to use
- 1.Choose File and pick a .bz2 file, or choose Hex or Base64 and paste the compressed bytes, then select Decompress.
- 2.The result shows the decompressed size, compressed size, expansion ratio, block size level, block and stream counts and the CRC status.
- 3.Valid UTF-8 output is previewed as text; anything else is shown as Hex.
- 4.Download saves the full output with the .bz2 extension removed.
- 5.Output stops at 128 MiB or at 200 times the input size after 16 MiB; you can raise the limit once for a stopped run.
Bzip2 Decompressor
Bzip2 compresses data in independent blocks of 100 000 to 900 000 bytes; the digit after the BZh magic (1 to 9) is the block size level. Each block is a Burrows–Wheeler transform followed by move-to-front, run-length and Huffman coding, and carries its own CRC-32 of the original bytes. The end of each stream stores a combined CRC built from all block CRCs. This tool decodes every block, recomputes both checksums and reports any mismatch, truncation or invalid table with the stream, block and byte offset. Files joined with cat a.bz2 b.bz2 hold several streams and are decoded in order. Randomised blocks, written only by bzip2 0.9.0 and earlier, are rejected. The tool only decompresses; it does not create .bz2 files.
TAR archives (.tar.bz2)
A .tar.bz2 or .tbz2 file is two layers: a TAR archive that bundles files, compressed with Bzip2. This tool removes only the Bzip2 layer, so archive.tar.bz2 becomes archive.tar. It does not list or extract the files inside the TAR archive; open the .tar file with a TAR tool or tar -xf.
Privacy
Decompression runs in your browser, in a Web Worker for larger inputs. Input and output are never uploaded or saved in browser storage.
Frequently asked questions
- Does the tool extract files from a .tar.bz2 archive?
- No. It removes the Bzip2 layer and gives you the .tar file (archive.tar.bz2 becomes archive.tar). TAR is a separate archive format; extract its entries with a TAR tool.
- How is integrity checked?
- Every block has its own CRC-32 over the decompressed bytes and every stream ends with a combined CRC of all its blocks. Both are recomputed and compared, and a mismatch is reported with the stream, block and byte offset.
- Are concatenated .bz2 files supported?
- Yes. Files joined with cat a.bz2 b.bz2 contain several streams; each is decoded in order and verified against its own CRC. Bytes after the last stream are reported as a warning.
- How does it protect against decompression bombs?
- Output is produced in small chunks and stops at 128 MiB, or at 200 times the input size after 16 MiB, before more memory is used. A stopped run keeps no partial file, and you can raise the limit once.
- Can it compress data to Bzip2?
- No. This tool only decompresses. Use the bzip2 command-line tool to create .bz2 files.
