Skip to content

Markdown to EPUB

Turn a Markdown file into an EPUB ebook, with each

Needs our servers

Drop Markdown files here

Needs our servers. You confirm before anything is uploaded.

Deleted 60 minutes after you download it.

Turn notes, documentation or a book drafted in Markdown into an ebook for any reading app. FormatJet converts the file on our servers with Pandoc, the open-source document converter, and writes an EPUB 3 with a chapter for each level-1 heading and a table of contents from your headings.

About the formats

MarkdownMarkdown document

Markdown is plain text with light marks for formatting: # for headings, * for lists, | for tables. People read it as it is, and AI assistants, wikis and code hosts take it directly.

EPUBEPUB ebook

EPUB is the open ebook format most reading apps use: chapters of text and pictures that reflow to fit any screen. Apple Books, Kobo and Google Play Books read it, and Amazon’s Send to Kindle takes it.

Converted with Ebook engine (Calibre, Pandoc).

Questions

Which Markdown does it read?

GitHub-flavoured Markdown, the kind GitHub, GitLab and most editors write, with headings, lists, tables, task lists, footnotes, code blocks, links and maths written between dollar signs. A YAML block at the top can set the book's title, author and language.

How is the book split into chapters?

Each level-1 heading (# Title) starts a new chapter, and the headings make the book's table of contents. Use

Where does the book's title come from?

From title in the YAML block at the top, if there is one. Otherwise from the file's level-1 heading when it has just one. With several, each is a chapter, and the book is called Untitled until you add a title.

What about pictures?

A Markdown file is converted on its own, so pictures it links to by a path or web address can't come with it, and each is replaced by its alt text. Pictures written into the file as data addresses are kept.

What happens to my file on your servers?

Pandoc, the open-source document converter, writes the EPUB on our servers without reading anything but your file, and the upload is deleted as soon as the EPUB is ready. The notice before you upload says when the EPUB goes, and “Delete now” removes it at once.

Markdown to EPUB with the API

Convert from your code with one request. See the Markdown to EPUB API

curl "https://api.formatjet.com/v1/convert?conversion=markdown-to-epub" \
  -H "Authorization: Bearer $FORMATJET_API_KEY" \
  -F file=@input.md \
  -o output.epub