stack twitter tryhackme rss linkedin cross

Wilco van Esch

Skip to main content

Search results

    This article is human-generated. Sometimes I use em dashes. Sometimes I even write coherent sentences. Everything about this text, good and bad, is me.

    How to convert Markdown text to an EPUB file

    When you're looking to convert Markdown text to an .epub file, there are many online options. However, you might be uncomfortable sending your text to someone else's server, especially if you have no reason to trust the website.

    However, there's an open source document converter you can run locally as a command-line tool. Pandoc has accrued a huge amount of social proof in its 20 years of existence.

    The official site has Getting started instructions, or go directly to Installation instructions per platform.

    Once you have Pandoc, to convert Markdown to EPUB:

    pandoc yourmarkdowntext.md -o newepubfile.epub

    That's all it takes.

    More options exist, including EPUB-specific options. For example, to add a cover image:

    pandoc yourmarkdowntext.md -o newepubfile.epub --epub-cover-image=gorgeouscoverimage.jpg