CruxDevCruxDev Tools Studio Prompts
file Utility • Zero-Server Privacy • 100% Client-Side

Markdown to EPUB Converter

Turn Markdown into a valid EPUB 3 ebook in your browser. Each # heading becomes a chapter, with a title, author, language and optional PNG or JPEG cover, a navigation document and an NCX for older readers.

Overview

Builds an EPUB 3 ebook from Markdown in your browser. Every top-level # heading starts a new chapter, and you can set the book title, author, language and a PNG or JPEG cover. The download includes a navigation document plus a toc.ncx so older e-readers show the contents too. Your text stays on your device.

How It Works

Type or paste Markdown, or open a .md file of up to 10 MB, and the chapter list on the right updates as you edit. Text before the first # heading becomes an Introduction chapter, and ## headings are added to the contents as sub-entries. Fill in the title, author and a BCP 47 language code such as en or fr-CA, optionally drop a cover image, then click Download .epub. The text and settings are saved in this browser, and Load sample restores a short example book.

Step-by-Step Usage Guide

  1. Write or paste your Markdown, using a # heading at the start of each chapter.
  2. Enter the book title, author and language code.
  3. Drop a PNG or JPEG cover image if you have one.
  4. Check the chapter list to confirm the breaks are where you expect.
  5. Click Download .epub and open the file in your e-reader app.

Technical Specifications & Standards

The EPUB container format is strict about its first file: the archive must start with an entry called mimetype, holding application/epub+zip, stored without compression, so readers can identify the file by its opening bytes. This builder writes that entry first and stores it uncompressed, followed by META-INF/container.xml and an OEBPS folder with content.opf, nav.xhtml, toc.ncx, a stylesheet and one XHTML file per chapter. The package metadata carries a random urn:uuid identifier, the title, creator and language, and the dcterms:modified timestamp that EPUB 3 requires. Markdown is converted with the site's own parser, which escapes raw HTML, then made into well-formed XHTML by self-closing tags such as br, hr and img. Headings inside fenced code blocks are not treated as chapter breaks. Images written as data URLs are decoded into real files and listed in the manifest; remote image URLs become links, because an EPUB must not depend on network resources. A cover is added as cover.xhtml with the cover-image property and the legacy cover meta tag.

Targeted Use Cases

  • Turning a long README or project documentation into an ebook for offline reading on a Kobo or phone.
  • Packaging a short story or newsletter series written in Markdown as an EPUB for readers.
  • Making course notes readable on an e-ink device with adjustable font size.
  • Producing a quick review copy of a manuscript before running it through a full publishing toolchain.

Notes & Gotchas

  • Use exactly one # heading per chapter and ## headings for sections, since that is how the contents are built.
  • Pick a cover around 1600 by 2560 pixels so it looks sharp on tablets without bloating the file.
  • Set the language code correctly, because readers use it for hyphenation and text-to-speech voices.
  • Embed pictures as data URLs if you need them inside the book, since relative image paths cannot be packaged here.

Frequently Asked Questions

How do I convert a Markdown file to EPUB?

Open the .md file or paste its text, give the book a title, then click Download .epub. Each line starting with a single # becomes a chapter and the file is built locally in a few seconds.

Will the EPUB open on Kindle?

Current Kindle apps and Send to Kindle accept EPUB files, and the output follows the EPUB 3 package rules with an NCX as a fallback. Older Kindle hardware that only reads MOBI or AZW3 will need a conversion step in a tool such as Calibre.

Why does the mimetype file matter?

Readers check that the archive begins with an uncompressed file called mimetype containing application/epub+zip. A ZIP made by an ordinary archiver often fails that check, which is why some readers reject hand-made EPUBs.

Can I include images in the ebook?

Yes, when they are written as data URLs in the Markdown, which the builder turns into image files inside the book. Links to images on the web are replaced by a text link, and relative paths show a placeholder because the picture is not available.

Does raw HTML in my Markdown get included?

No. The converter escapes raw HTML so it appears as text, which keeps every chapter valid XHTML. Use Markdown syntax for tables, lists, links, emphasis and code blocks.

Related tools

  • EPUB Reader & EPUB to Text / HTML / Markdown - Open a DRM-free EPUB in your browser, browse chapters from its table of contents, and export the whole book as plain text, Markdown or one self-contained HTML file. Scripts are stripped and nothing is uploaded.
  • Markdown to Word (DOCX) Converter - Convert Markdown or a GitHub README into an editable Word .docx with real headings, numbered and nested lists, bordered tables, code blocks, links and embedded images, built in your browser.
  • Markdown to PDF Converter - Convert Markdown or a GitHub README to PDF with code highlighting, Mermaid diagrams, math, page size, margins and a table of contents.
  • Markdown Preview - Write Markdown with live side-by-side HTML preview. Supports GFM tables, code blocks, and more.
  • Word to HTML / Markdown - Convert a Word .docx file to clean HTML and GitHub Markdown with headings, lists, tables and links kept, and images embedded as base64 or exported as separate files in a ZIP.
  • HTML to Markdown Converter - Convert HTML into clean GitHub-flavored Markdown - headings, links, images, lists, code blocks, and tables - with Markdown-significant characters safely escaped.