File format

MOBI - Mobipocket eBook

MOBI is the Mobipocket ebook format that Amazon built the first Kindle on, so you meet it in older ebook collections and in files that were converted years ago.

A MOBI file is an ebook in the Mobipocket format. Mobipocket was a French company whose reader software ran on Palm and Windows Mobile handhelds; Amazon bought it in 2005 and made the format the basis of the first Kindle. That is why MOBI files and Kindle files look so similar on the inside. Amazon has since moved its own tools on to Kindle Format 8 and EPUB, so MOBI is now a legacy format you meet in older ebook collections rather than one anybody publishes into.

How a MOBI file is put together

MOBI is built on the Palm Database format, a container from the Palm OS era, and it is binary: opening one in a text editor shows nothing useful. The file starts with a header that names the database, normally a squashed version of the book's title, and marks it with the type code BOOKMOBI. Everything after that is a numbered list of records.

The text of the book is split across records of up to four kilobytes each and squeezed with either the PalmDOC compression scheme or the denser HuffCDIC scheme; some files leave it uncompressed. Both schemes are lossless, so the packing loses nothing. The markup inside is a cut-down HTML, close to the web of the late nineties, with only a little styling and no embedded fonts. Images are stored as their own records and referenced by number. Files produced by Amazon's old kindlegen tool are often two books in one: a MOBI section for old devices followed by a Kindle Format 8 section for new ones, separated by a boundary record.

What metadata a MOBI file carries

MOBI keeps its descriptive information in the EXTH header, short for extended header, which sits just after the main MOBI header. It is a list of entries, each tagged with a number rather than a name, which is why a report often shows both. The ones you will actually see are the author (record 100), publisher (101), description or blurb (103), ISBN (104), subject tags (105), publication date (106), contributor (108), rights statement (109) and ASIN (113), the identifier Amazon gives a title in its own catalogue. There is also a language entry, and an updated title that overrides the name in the Palm header.

Two of those repay a closer look. The contributor field is rarely a person: conversion tools stamp themselves there, so it commonly reads as Calibre or kindlegen with a version number, which tells you what handled the file and roughly when. The Palm header adds its own creation and modification timestamps. So a MOBI carries author and publisher names by design, and beyond that it records the software that built it and when, while an ASIN or ISBN ties the file to one published edition. Amazon's DRM-protected relatives of MOBI, the .azw files, are additionally locked to the account that bought them. A cover image inside the file also keeps its own EXIF data, the camera information block found in photographs.

When to use MOBI

The one good reason to keep a book as MOBI is a device that cannot read anything newer: an early Kindle, or a Mobipocket-era handheld. For anything else the trade-off is stark. MOBI has no embedded fonts, almost no layout control, no fixed-layout mode and a single linear reading order, so publisher typography and complex pages simply do not survive in it. EPUB is the portable choice and AZW3 is the Kindle-native one, and both accept modern styling. Converting a MOBI up to either is easy, but conversion cannot recover design the format never stored in the first place.