From Markdown to EPUB: A Guide for Technical Authors
Convert your Markdown manuscript into an EPUB 3.0 file that passes epubcheck and gets accepted by Amazon KDP, step by step in your browser without installing Pandoc or Calibre.
If you write technical documentation, developer guides, or programming books, you likely write in Markdown: code blocks, tables, and nested headings are far easier to maintain in plain text than in a messy Word document with manually applied styles. The challenge begins when that same Markdown manuscript must be converted into an EPUB that Amazon KDP accepts without errors. Most generic converters fall short because the files they produce might open in a desktop reader, but fail strict publishing validation standards.
Why “Generic” Markdown-to-EPUB Converters Fail KDP Checks
A common way to convert Markdown to EPUB is reusing a print stylesheet and stripping out @page and break-* rules. While the resulting file might technically open in Apple Books, Amazon KDP frequently flags it or renders it poorly:
- Print units that reflowable EPUB readers cannot parse. Hardcoded dimensions in
pxorpt, or CSS variables likevar(--...), work fine in web browsers but break inside e-readers — leading to inconsistent styling across Kindle devices. position: fixed,@media print, andoverflowrules. Reflowable ebooks have no fixed physical page: each e-reader repaginates dynamically based on the user’s font size and screen dimensions, rendering static page rules obsolete.- Unwrapped code snippets and long URLs. Without
white-space: pre-wrapandoverflow-wrap: break-word, long lines of code or links overflow the visible viewport, triggering KDP’s “This text is outside the margins” warning. - Disappearing
<hr>elements. In print CSS, thematic section dividers are often resolved with page breaks. Carrying that rule into an EPUB produces zero-height markup, which KDP reports as “non-printable markup”. - Missing Dublin Core metadata. An EPUB with an empty
dc:descriptiontriggers validation errorRSC-005, making the file technically non-compliant with the officialepubcheckstandard.
Markfolio does not derive its EPUB from a print stylesheet: it applies a dedicated reflowable engine that preserves typography and branding while ensuring zero validation errors.
Step-by-Step: Converting Markdown to EPUB
- Upload your manuscript. In the Book Creator wizard, select “I already have a manuscript” and upload your
.md(or.docx) file. - Choose a theme. For technical non-fiction, the Technical Book template applies clean syntax highlighting, readable monospace fonts, and structured callouts.
- Select output format. Choose
EPUB,PDF, orBoth. If you also plan to publish a paperback edition on KDP,Bothcompiles both files simultaneously from your single Markdown source. - Set book language. The language selector populates
dc:languageinside your EPUB package, matching the catalog language required by Amazon KDP. - Add EPUB metadata. Enter title, author, and description (up to 500 characters).
- Generate and download. Click “Generate EPUB” to build your file instantly in memory — without installing Pandoc, Calibre, or Python dependencies.
What Markfolio Validates Before Export
| Check | Description |
|---|---|
| Structure | Automatically builds a navigable Table of Contents (NCX/Nav) from h1–h3 headings. |
| Images | Embeds images as base64 or bundled assets directly inside the EPUB package to prevent broken external paths. |
| Compliance | Compiles EPUB 3.0 compliant files verified against epubcheck, Calibre, and Apple Books. |
| Speed | Compiles manuscripts up to 50 pages in under 5 seconds; dual PDF + EPUB builds take under 35 seconds. |
| Resilience | If PDF compilation experiences an issue, EPUB compilation continues uninterrupted, delivering your file without blocking. |
Frequently Asked Questions
Do I need Pandoc or Calibre installed? No. Everything runs natively inside the browser — Markfolio compiles the EPUB package entirely in client memory without writing temporary files to your disk.
Can I upload this EPUB directly to Amazon KDP? Yes. The output is a standard, validated EPUB 3.0 file, which is Amazon KDP’s preferred format for Kindle ebook submissions.
What happens if my Markdown has no headings?
The EPUB will still generate, but the Table of Contents will be empty, and Markfolio will alert you before downloading. Adding #, ##, or ### headings resolves this instantly.
Can I compare this workflow with Kindle Create? Yes, we published a detailed criterion-by-criterion breakdown comparing Markfolio and Kindle Create.
Get the data before anyone else
One email when we publish a new analysis of the KDP market. No noise, one-click unsubscribe.