Markdown EPUB Swap
Markdown to EPUB
Converting on this device…
The file is not uploaded.
1 · Choose a Markdown file
.md, .markdown, .mdown, .mkd · stays in this tab
2 · Convert
3 · Download
Choose a file to convert. It is not uploaded.
HTML pivot preview
FAQ and format details
Why convert Markdown to EPUB?
Self-publishers and teachers often write in Markdown because Git diffs and because it is not InDesign. Markdown→EPUB is the shortest path to Apple Books or Thorium without Calibre if your needs are simple: chapters, paragraphs, lists, a few tables.
How this conversion runs
GFM becomes HTML. Two or more h1s become separate XHTML spine items; a single title heading stays one chapter. package.opf, nav.xhtml, and a modest CSS file are added. Front matter YAML is not used as EPUB metadata beyond the filename-derived title unless a heading supplies one.
Keep in mind for Markdown → EPUB
This is not a press toolchain: no ISBN metadata UI, no cover-image picker, no footnote-to-popup mapping. Wikilinks will not resolve to other chapters. Code-heavy books look better as HTML or PDF. Kindle's preferred store format is still not EPUB on every device generation.
After you have a EPUB file
Open in Thorium or Apple Books and check the TOC. Add a cover and metadata in Sigil or Calibre if you are distributing. For Amazon, run Calibre's converter. Keep writing in Markdown; regenerate the EPUB rather than editing XHTML by hand unless you are done drafting.
How should I mark chapters in the Markdown?
Use a single # heading per chapter, then ## for sections. If every heading is ##, you will get one chapter and a flatter nav.
Will my images from a relative path embed?
Only if they are already inlined (data URLs) or present as HTML <img> with data URLs after a prior conversion. This page does not read a folder of sibling PNGs next to the .md.
This pair at a glance
- Accepts
- .md, .markdown, .mdown, .mkd
- Writes
- .epub · application/epub+zip
- Read fidelity
- high (Markdown → HTML)
- Write fidelity
- high (HTML → EPUB)
- Source size
- Plan for files under 3.8 MB
The file is read in this tab. It is not uploaded.
Something off with this pair? Send feedback.
About Markdown and EPUB
Source file
Markdown
A lightweight plain-text syntax for structured writing that compiles to HTML. The lingua franca of README files, wikis, and note apps.
Markdown stores documents as readable plain text with a small set of punctuation conventions for headings, emphasis, lists, links, and code. GitHub-Flavored Markdown (GFM) adds tables, strikethrough, task lists, and fenced code blocks. Conversion through HTML is a natural fit because Markdown was designed as an HTML shorthand.
- Extensions
- .md, .markdown, .mdown, .mkd
- MIME types
- text/markdown, text/x-markdown
- Kind
- text · utf-8
- Category
- markup
- Standard
- Open format · since 2004
- Spec
- CommonMark / GFM
- Comfortable size
- Up to about 3.8 MB in this browser converter
- Read into HTML
- high fidelity · implemented — Parsed as GitHub-Flavored Markdown.
What this format can hold
- headings
- paragraphs
- lists
- tables
- links
- images
- inline formatting
- code blocks
- blockquotes
Usually dropped on the way in
- raw html passthrough is sanitized
Apps that consume Markdown
- GitHub (GitHub) — creates and opens on Web
- Obsidian (Dynalist) — creates and opens on Windows, macOS, Linux, iOS, Android
- VS Code (Microsoft) — creates on Windows, macOS, Linux
- Typora — creates and opens on Windows, macOS, Linux
- Notion — creates and opens on Web, Windows, macOS
- Jupyter — creates and opens on Web
- Discord — opens on Web, Windows, macOS, iOS, Android
Catalog notes
Destination file
EPUB
The open ebook format: a ZIP of XHTML chapters, CSS, and a package manifest. What Apple Books, Google Play Books, and most non-Kindle readers consume.
EPUB 3 is HTML in a spine. That makes the HTML hub almost native: we concatenate or split XHTML documents and rewrite the OPF package. Kindle’s AZW/MOBI family is a different type and is not in this matrix.
- Extensions
- .epub
- MIME types
- application/epub+zip
- Kind
- zip · binary
- Category
- ebook
- Standard
- Open format · since 2007
- Spec
- EPUB 3 (W3C)
- Comfortable size
- Up to about 38 MB in this browser converter
- Written from HTML
- high fidelity · implemented — Emits EPUB 3 with a single content document split on h1, plus nav.xhtml.
What this format can hold
- headings
- paragraphs
- lists
- links
- images
- inline formatting
- chapters
- table of contents
Usually dropped on the way out
- multi file chapter map unless h1 split
Apps that consume EPUB
- Apple Books (Apple) — opens on macOS, iOS
- Google Play Books (Google) — opens on Web, Android, iOS
- Calibre — creates and opens on Windows, macOS, Linux
- Thorium Reader — opens on Windows, macOS, Linux
- Foliate — opens on Linux
- Kindle (via conversion) (Amazon) — opens on e-ink, iOS, Android
- Sigil — creates on Windows, macOS, Linux
Catalog notes
Other conversions
Other conversions from Markdown: HTMLWordRTFOpenDocumentPDF
Other ways to get EPUB: HTMLWordRTFOpenDocumentPDF