Document tools

Markdown to EPUB

Convert markdown to epub with pandoc. Runs entirely on your device.

Runs on your device. The file is never uploaded.

Markdown to EPUB packs a Markdown file into an .epub book, fetched as a written file because the format is binary rather than text. Book metadata comes from your document, and a complaint about a missing title or language prints to the console. No cover image, stylesheet or contents depth can be set here.

Input

Questions

Why does my EPUB have no title or author?

Because pandoc takes book metadata from your document and the tool adds none of its own. If your Markdown has no metadata, pandoc warns that the document has no title and that no language is set, and those warnings print in the browser console prefixed with "pandoc:". Put a YAML metadata block with title, author and lang at the top of the Markdown and pandoc will use it.

Can I add a cover image or a stylesheet?

Not here. This tool has no options: it calls pandoc with the input format, the output format and nothing else. Cover images, custom CSS and a table of contents depth are all pandoc command line options that are not exposed. Open the .epub in an EPUB editor afterwards if you need those.

Do images in my Markdown get packed into the book?

No. Only the text of your Markdown reaches pandoc, so a local image path cannot be read and nothing is packed into the EPUB. Pandoc logs the resource it failed to fetch as a console warning. An EPUB is a zip, so you can add the images and fix the references with an EPUB editor after converting.

What file do I get, and will my reader open it?

You get your file name with the .epub extension, written through pandoc's output-file path because EPUB is binary. It is whatever pandoc's EPUB writer produces. No validator runs on this page, so if a reader rejects the book, open the browser console and read the warnings pandoc printed while converting.

Is there a tool to convert an EPUB back to Markdown?

Not on this site. The pandoc pairs here all run through Markdown as the hub, and EPUB is a one-way spoke. If what you wanted was an editable document, use Markdown to Word (DOCX), and for a web page use Markdown to HTML.

Related Document tools