Mobipocket file signature
Magic number at offset 60 · BOOKMOBI
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.
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.
What each byte of 42 4F 4F 4B means
Here is the signature byte by byte, the way a hex editor shows it: the position in the file, the value in hex and in decimal, and the character that value stands for in ASCII. Bytes with no printable character show a dot.
| Byte offset | Hex | Decimal | ASCII |
|---|---|---|---|
| 60 | 42 | 66 | B |
| 61 | 4F | 79 | O |
| 62 | 4F | 79 | O |
| 63 | 4B | 75 | K |
| 64 | 4D | 77 | M |
| 65 | 4F | 79 | O |
| 66 | 42 | 66 | B |
| 67 | 49 | 73 | I |
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 bytes of any file yourself. They 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
- Drop the file into the WhatFileType identifier, which reads the signature without uploading it.
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
Reuse this signature
This entry is part of the WhatFileType file signature reference, published under a CC BY 4.0 licence with the full provenance for every entry, a copy-paste embed and a JSON export. Credit WhatFileType and the data is yours to republish.