Skip to content
Guides

How to convert Markdown to EPUB

Package Markdown into an EPUB ebook that opens on any e-reader — how chapters come from headings, what metadata to set, and where EPUB beats PDF for reading.

June 15, 20263 min read
EBOOKMD → EPUBGUIDEMARKDOWN# Chapter 1EPUBbook.epubReflows on any e-reader

EPUB is the open standard for ebooks — the format Apple Books, Kobo, Google Play Books, and most e-readers understand. If you've written something long in Markdown, Markdown to EPUB packages it into a proper ebook in your browser.

Why EPUB instead of PDF for reading

A PDF has fixed pages; an EPUB reflows. The reader chooses the font, the size, the margins, and the line spacing, and the text rewraps to fit their screen — phone, tablet, or e-ink reader. For anything meant to be read rather than printed, that's a far better experience: no pinch-zooming, no tiny text, no horizontal scrolling.

How chapters work

EPUB readers build their table of contents from your document's headings. Structure your Markdown with that in mind:

  • Use a top-level heading (#) for each chapter.
  • Use ## and ### for sections within a chapter.
  • Keep the hierarchy consistent — don't jump from # to ###.

The result is a navigable book: readers can jump straight to any chapter from the contents menu, and their progress and bookmarks work as expected.

Metadata worth setting

A book is more than its text. Set a clear title as the first # heading, and keep the writing well-structured so the generated contents are clean. Cover art and rich author metadata vary by reader; the priority is solid heading structure, which drives navigation everywhere.

What suits EPUB

  • Long-form writing: a guide, a manual, a collection of essays, a book draft.
  • Anything read on a phone or e-reader for more than a few minutes.

What doesn't suit it: layout-precise documents (use PDF) and wide data tables, which fixed-width formats render more reliably.

Privacy

The EPUB is assembled locally — your manuscript never leaves your browser, which matters for unpublished work.

Write the book in Markdown, generate the EPUB, and side-load it onto any reader. To pull text out of an existing ebook, use EPUB to Markdown.

Tags#markdown#epub#ebook#how-to

More from Guides

See all →