Skip to content

JBIG2 image fileTrailer:03 33 00 01 00 00 00 00 (.jb2)

.jb2 file signature | image/x-jbig2

JBIG2 image fileTrailer:03 33 00 01 00 00 00 00(.3......)

Safe

Magic Bytes

Offset 0
97 4A 42 32 0D 0A 1A 0A

Sources: Apache Tika, Gary Kessler

Extension

.jb2

MIME Type

image/x-jbig2

Byte Offset

0

Risk Level

Safe

Validation Code

How to validate .jb2 files in Python

Python
def is_jb2(file_path: str) -> bool:
    """Check if file is a valid JB2 by magic bytes."""
    signature = bytes([0x97, 0x4A, 0x42, 0x32, 0x0D, 0x0A, 0x1A, 0x0A])
    with open(file_path, "rb") as f:
        return f.read(8) == signature

How to validate .jb2 files in Node.js

Node.js
function isJB2(buffer: Buffer): boolean {
  const signature = Buffer.from([0x97, 0x4A, 0x42, 0x32, 0x0D, 0x0A, 0x1A, 0x0A]);
  return buffer.subarray(0, 8).equals(signature);
}

How to validate .jb2 files in Go

Go
func IsJB2(data []byte) bool {
    signature := []byte{0x97, 0x4A, 0x42, 0x32, 0x0D, 0x0A, 0x1A, 0x0A}
    if len(data) < 8 {
        return false
    }
    return bytes.Equal(data[:8], signature)
}

API Endpoint

GET /api/v1/jb2
curl https://filesignature.org/api/v1/jb2

See the full API documentation for all endpoints and parameters.

Frequently Asked Questions

What is a .jb2 file?

A .jb2 file is a JBIG2 image fileTrailer:03 33 00 01 00 00 00 00 file. JBIG2 image fileTrailer:03 33 00 01 00 00 00 00(.3......)

What are the magic bytes for .jb2 files?

The magic bytes for JBIG2 image fileTrailer:03 33 00 01 00 00 00 00 files are 97 4A 42 32 0D 0A 1A 0A at byte offset 0. These bytes uniquely identify the file format regardless of the file extension.

How do I validate a .jb2 file?

To validate a .jb2 file, read the first bytes of the file and compare them against the known magic bytes (97 4A 42 32 0D 0A 1A 0A) at offset 0. This is more reliable than checking the file extension alone, as extensions can be renamed.

What is the MIME type for .jb2 files?

The primary MIME type for .jb2 files is image/x-jbig2.

Is it safe to open .jb2 files?

JBIG2 image fileTrailer:03 33 00 01 00 00 00 00 (.jb2) files are generally safe to open. They are classified as low risk because they primarily contain data rather than executable code. However, always ensure files come from a trusted source.