The short version

A .mobi is a Palm database: a record list, a header record, then the text compressed in four kilobyte pieces, then the pictures. Unpacking it is straightforward. DRM is not, and it is the thing that decides whether the file can be read at all.

Drop the book and it will either show you the text or tell you exactly why it cannot.

MOBI is a format Amazon inherited from Mobipocket in 2005, used for fifteen years, and retired in 2022. Files keep turning up, from old libraries and old devices and archives, and there is no Kindle app left that will politely turn one into anything else.

What is in the file

The recordsA Palm database, and the parts that are the book
A Palm databaseHeader and record listwhere everything isRecord 0: the headerscompression, encoding, DRMRecords 1 to n: the textcompressed, in piecesThen the picturesone record eachThen the indexesnot text at allThe bytes that are not textthe text of the pageindexEvery text record can end withbytes that belong to an index.How many is a bitfield near theend of the header. Miss it andeach record boundary spills afew characters into the book.
The text is split across records of about four kilobytes each and compressed with a small LZ77 variant. The catch is at the end of each one: a book can carry index data there, and how much is a bitfield near the end of the header rather than anything in the record itself.
What the header saysFour things read before anything else
  • Whether the book has DRMstop, or carry on
  • Which compression is in usesimple, or HUFF/CDIC
  • Where the text records endand the pictures begin
  • How the text is encodedWindows-1252 or UTF-8

Getting the trailing bytes wrong is the classic MOBI bug, and it is quiet: the book reads correctly except for a few characters of rubbish every few pages, at exactly the record boundaries. It looks like a scanning error rather than a parsing one.

The question that decides everything

Before anything else: does the book have DRM on it. If it was bought from the Kindle store, it almost certainly does, and that is the end of the conversation.

One question, two answersWhat decides whether a Kindle book converts
Bought from the Kindle storeThe text in the file is encryptedagainst the account and the deviceit was sold to. There is no key inthe file and none in your browser.Cannot be converted.Everything elseSideloaded, sent to yourself, asample, a manual, a public domainbook, or anything published withoutDRM on it. The text is simply there.Converts.
DRM encrypts the text against the account and the device the book was sold to. The key is not in the file, so no amount of cleverness in a browser gets at the words. This reads the flag in the header and says so, rather than producing a PDF full of nothing.
This will not remove DRM, and nor should anything you find
Tools that claim to are asking you to install something, and in most places they are asking you to break the law as well. If the book is one you bought and you want it on paper, check whether the publisher sells a DRM-free copy; a great many do, directly or through a shop that does not use it.

What does convert is everything else, and there is more of it than people expect: manuscripts, samples, manuals, documents somebody emailed to a Kindle, a great deal of independently published work, and every public domain book from Project Gutenberg and Standard Ebooks.

What comes through

Comes through

The text, in full, in reading order.

Headings, paragraphs, lists and tables as the file marks them.

Bold, italic, underline and the rest of the inline styling.

Pictures, pulled out of their own records and placed where they belong.

The title and author from the file's own metadata.

Does not

The Kindle's typesetting, which was the device's work, not the file's.

Positions in the file, which a page has no use for.

Notes, highlights and reading position, which live on the device.

Books with DRM, which cannot be read at all.

HUFF/CDIC compressed books, which are refused by name.

Text
Stays text

Searchable and selectable in the PDF.

Pictures
Placed

Read from the records the markup points at.

DRM
Named

Rather than a broken file and no explanation.

The compression that gets refused

Almost every MOBI uses a small LZ77 variant that takes about thirty lines to decompress. A minority use HUFF/CDIC instead, which is Huffman coding with its dictionaries in their own records, and it is a genuinely different piece of work.

Rather than read half of it and produce a book full of nonsense, this refuses by name and says what to do: Calibre handles it, and converting to EPUB there is usually the shortest way round.

Why this runs in your browser

A book on somebody's machine is a manuscript, a purchase, or something a friend sent. None of those want uploading to a converter, and unpacking a Palm database is a few hundred lines of arithmetic that a browser runs instantly.

The file is read in memory, the book is laid out with real fonts, and the PDF is checked by reopening it before it is handed over. Nothing is transmitted and nothing is stored.

The tool is right above

Drop a .mobi, look at how it read the book, and take the PDF.

Jump to the tool

Common questions

DRM, the compression this refuses, and what the conversion keeps.

01It says my book has DRM. Is there a setting for that?

No, and there should not be. DRM means the text in the file is encrypted against the account it was sold to, and the key is not in the file. Nothing here will remove it and nothing here will try. If the book is one you bought from the Kindle store, read it in a Kindle app; if you need it as a PDF, check whether the publisher sells a DRM-free copy.

02Which of my books will convert, then?

Anything without DRM on it: a manuscript you or somebody else made, a sample chapter, a public domain book from Project Gutenberg or Standard Ebooks, a manual, a document somebody emailed to a Kindle, and a good deal of independently published work. The tool tells you which kind you have as soon as you drop the file.

03Why does my book look plainer than it did on the Kindle?

Because an old MOBI is written in a cut-down HTML from the 1990s, with no stylesheet worth the name. What a Kindle showed you was partly its own typesetting. The text, the headings, the lists, the tables and the pictures all come through; the exact look does not, and a PDF is a different shape of thing anyway.

04What is HUFF/CDIC and why was my book refused for it?

A second compression scheme MOBI supports, using Huffman coding with dictionaries stored in their own records. It is a different codec from the simple one almost every file uses, and reading half of it would produce a book full of nonsense. Calibre handles it, and converting to EPUB there and coming back is one option.

05Are the pictures included?

Yes. Images live in their own records after the text, and the markup points at them by number, so they are pulled out and placed where they belong. Anything that cannot be read is left out and reported rather than shown as a broken box.

06Is .mobi still a format Amazon uses?

No. Amazon stopped accepting MOBI for new publishing in 2022 and Send to Kindle no longer takes it. Files still turn up from older libraries, older devices and archives, which is most of the reason anybody needs to convert one.

07Should I convert to PDF or to EPUB?

PDF if it is going to be printed, annotated, filed or sent somewhere that expects a document. EPUB if it is going to be read on a device, because it reflows and a PDF does not. Calibre does MOBI to EPUB; this does MOBI to PDF.

08Is my book uploaded?

No. The file is read and the PDF built in your browser. Nothing is transmitted and nothing is stored.