How to turn a Markdown file into a Kindle book

Export the Markdown as a reflowable EPUB with your typefaces packaged in it, add a 1,600 by 2,560 pixel cover, and upload that EPUB to KDP. Amazon converts it to the format the Kindle actually reads. You do not need Calibre, a .mobi file, or Amazon's old .kpf toolchain unless something in the preview is specifically broken.

The advice still circulating from 2014 is to convert Markdown to HTML, open it in Calibre, export MOBI, and hope. MOBI is a legacy format Amazon has been retiring for years, and Calibre is a useful library tool that is a roundabout way to produce a file KDP would rather you did not send. The current path is shorter.

Kindle wants a reflowable ebook, not a PDF

A Kindle is a small screen with a type size the reader chooses. A PDF is a picture of a piece of A4. Uploading a PDF as a Kindle book produces the thing you have seen and disliked: pinching and panning around a page that was designed for paper. KDP will often accept the file. That does not mean it was the right file.

The format that matches the device is a reflowable EPUB. The text is in the file; the Kindle lays it out for the screen it has. This is the same reason you want an EPUB for Apple Books and Kobo — PDF and EPUB are for different jobs.

What to put in the Markdown so the EPUB is clean

  • # once, for the title. ## for every chapter. Skipping levels, or using # for chapters, is how Kindle's table of contents becomes a single entry or a mess.
  • A page-break marker between chapters if your exporter has one. In an EPUB this becomes a chapter boundary, which is what you want — a new chapter should not start at the tail of the previous one.
  • Images as files you actually ship, not as URLs to someone else's server. Kindle will not fetch those, and some exporters will drop them on purpose.
  • No columns, text boxes, or headers-and-footers-as-content. They are page ideas, and the Kindle does not have those pages.

Front matter still belongs in the file — title, copyright, a short contents page if you want one on paper. On a Kindle the contents that matters is the navigation built from your headings, not a printed list. How to do that without a plugin.

The cover Kindle actually displays

One JPEG, 1,600 × 2,560 pixels, RGB, no border, title readable at the size of a postage stamp. That file is what shows in the Kindle store and on the device library. It is not an A4 page, and an A4 export used as a cover will be cropped. The longer version of the numbers is in ebook cover sizes.

Attach it as the EPUB's native cover, not as the first image in the manuscript. If it is only in the manuscript, some devices show a blank or a generic icon in the library and then the image as page one — two different, both-wrong, experiences.

Upload, don't convert locally

What you might sendWhat KDP doesDo this?
EPUB (reflowable)Converts to Kindle's internal formatYes — the current recommended upload
DOCXConverts, with mixed fidelityOnly if that is the only file you have
PDFOften treated as a print replicaNot for a text book
MOBI / PRCLegacy; still accepted in places, worse resultsNo
KPF from Kindle CreateAmazon's own packaged formatIf Kindle Create is already your tool; not required

After upload, use KDP's online previewer, then email the file to your Kindle address and read a chapter on the device or in the Kindle app. The online previewer is a sketch. Hyphenation, image size, and how a table behaves at large type only show up on the real thing. The rejections EPUBCheck catches before KDP does are worth running first so the upload is not your first error message.

What about a paperback on the same account?

That is a second product. The Kindle book is the EPUB; the paperback is a print-ready PDF at a trim size KDP specifies, with a separate wraparound cover that includes the spine. You cannot upload the EPUB as the paperback interior, and you should not upload the paperback PDF as the Kindle book. What KDP actually wants separates the two in detail.

The Markdown manuscript can be the source of both, which is the reason to have written it in Markdown. Two exports, two uploads, one set of words.

Doing this from bukpress

bukpress exports a reflowable EPUB on Pro, with the typefaces you chose packaged in the file and the uploaded front cover set as the native cover. The same project exports the PDF. There is no Kindle-specific download — you do not need one; KDP takes the EPUB.

Two limits worth being exact about: pages are A4, so the PDF is not a 6×9 paperback interior, and the EPUB is reflowable, not a print replica. For a text book going to Kindle, those are the correct choices rather than missing features.

Read next

Guides · 5 min read

What Amazon KDP actually wants from your file

KDP is two products behind one dashboard. The Kindle ebook wants a reflowable file — EPUB is the format to give it — plus a cover image around 1,600 by 2,560 pixels. The paperback wants a print-ready PDF built at a specific trim size with margins that widen as the book gets longer, and a separate one-piece cover including the spine.

Read it
Explainers · 4 min read

EPUB or PDF: how to choose, and why you probably want both

Use PDF when the page is fixed and matters — print, handouts, workbooks, anything with a layout the reader must see as you set it. Use EPUB when the text should adapt to the reader's screen and type size, which is every e-reader and almost every ebook store.

Read it
How-to · 4 min read

Why your EPUB was rejected, and how to read EPUBCheck

Run EPUBCheck before uploading anywhere: it is the same validator the stores run, and it names the file and line for every problem. Errors block ingestion and must be fixed; most warnings are advisory, with the exception of remote resources and missing accessibility metadata, which some stores treat as fatal.

Read it

Write it in Markdown. Ship a book.

bukpress turns the file you are already writing into a typeset PDF and EPUB — your type, your covers, no watermark on any plan.

Start free — no card required