42

Mobipocket file signature

Magic number at offset 60 · BOOKMOBI

42 4F 4F 4B 4D 4F 42 49

Mobipocket e-books are Palm Database (PDB) files. The type/creator marker BOOKMOBI sits at offset 60, after the 32-byte PDB name and record headers.

Hex signature
42 4F 4F 4B 4D 4F 42 49
Offset
60 bytes
ASCII
BOOKMOBI
Length
8 bytes

What this magic number means

A magic number is a short, fixed run of bytes at a known position that tells a program what a file really is, no matter what the filename says. If a file contains, at offset 60, the bytes 42 4F 4F 4B 4D 4F 42 49 (the text BOOKMOBI), it is a Mobipocket file.

Amazon's later .azw3 (KF8) format is also a PDB and shares this structure, which is why old Kindle files often show BOOKMOBI at the same offset.

Formats that use the 42 4F 4F 4B signature

These file types in our database carry this signature:

How to check a file's signature

You can read the first bytes of any file yourself. The magic bytes are shown in hex, the same way this page lists them.

Linux & macOS

  • xxd -s 60 -l 8 example.mobi
  • hexdump -C -s 60 -n 8 example.mobi
  • file example.mobi

Windows (PowerShell)

  • Format-Hex -Path example.mobi -Count 68

Python

  • f=open("example.mobi","rb");f.seek(60);f.read(8).hex()

In your browser

Frequently asked questions

What is the Mobipocket file signature?

Mobipocket files carry, at offset 60, the hex bytes 42 4F 4F 4B 4D 4F 42 49 (BOOKMOBI in ASCII). This magic number identifies the format regardless of the file's name or extension.

How do I check a file's magic number?

Open the file in a hex editor, or run a command such as xxd -l 68 example.mobi on Linux or macOS, or Format-Hex -Path example.mobi -Count 68 in Windows PowerShell, and read the first bytes.

Can a file fake the Mobipocket signature?

Renaming a file does not change its bytes, so the extension can lie but the signature usually cannot. A genuine Mobipocket file has these exact bytes; a file with the wrong bytes is not really Mobipocket, whatever its name says.

Sources