GALAXY OF TOOLS

FILES SECTOR

Markdown to EPUB Converter

Turn Markdown into a valid EPUB 3 ebook with chapters, a table of contents, a cover, styled code and tables.

Optional front matter (title:, author:) between --- lines fills in the book details.
Pages and styling
Chapters in the book

    Runs entirely in your browser. Nothing you enter or upload is sent to a server.

    Make an EPUB ebook from Markdown in your browser

    The Markdown to EPUB converter turns plain Markdown into a real ebook: every # heading becomes a chapter, ## headings become sections in the table of contents, and tables, code, quotes, lists and images are styled for e-readers. You add a title, authors, language and an optional cover, and download a standards-compliant EPUB 3 file.

    It suits writers drafting in Obsidian, iA Writer or VS Code, teachers turning notes into a handout, developers packaging documentation, and anyone who wants to read their own writing on a Kobo, PocketBook, Apple Books, Google Play Books or a Kindle (Send to Kindle accepts EPUB files).

    Everything happens in your browser. The manuscript and images are never uploaded, which matters for unpublished work.

    How to convert Markdown to EPUB

    1. Paste your Markdown into the box, drop a .md file on it, or press Open .md file.
    2. Fill in the Book title, Author(s) and Language. Front matter such as title: and author: fills these in for you.
    3. Choose how Chapters are split, pick a Cover (generated, uploaded or none) and tick the title page, contents page and code colouring options you want.
    4. If the Markdown uses local pictures such as ![Map](map.png), press Add image files and select them.
    5. Check the chapter list, then press Create EPUB. The file downloads and a structure check confirms it is valid.

    Markdown to EPUB Converter features

    Chapters and nested contents

    Split at # headings or at # and ## headings. The EPUB 3 navigation document and the EPUB 2 NCX both list chapters with their sections, so every reading app shows a usable table of contents.

    Valid EPUB 3 output

    The package has the stored mimetype first, a complete manifest and spine, dcterms:modified metadata, landmarks and well-formed XHTML; a built-in check verifies every link and file before you download.

    Covers made for you

    Upload a JPEG or PNG cover, or let the tool draw a clean typographic cover from the title and author at 1600 × 2400 pixels.

    Styled code, tables and quotes

    Fenced code blocks can be colour-highlighted with highlight.js, GitHub-style tables keep their column alignment, task lists show ☑ and ☐, and block quotes get a side rule.

    Images from anywhere

    Images can be embedded data URIs, files you add, or web addresses that allow cross-site downloads; anything that cannot be fetched is reported instead of silently breaking the book.

    Working internal links

    A link to a heading such as [see results](#results) is rewritten to point at the right chapter file.

    How your Markdown maps to the ebook

    MarkdownIn the EPUB
    # HeadingStart of a new chapter (and a contents entry)
    ## HeadingSection listed under its chapter, or a chapter of its own with the ## option
    Text before the first headingAn “Introduction” chapter
    ```python fenced codeMonospaced block, colour-highlighted if you choose
    | a | b | tablesBordered table with a shaded header row
    - [x] done☑ done
    ![alt](image.png)Embedded image with its alt text
    Raw HTMLKept when it is safe and valid in EPUB; scripts and forms are removed

    Tips for a better ebook

    • Use one # heading per chapter and keep ## for sections. Skipped levels (# then ###) still work, but a clean outline reads best on small screens.
    • Covers look best at a 2:3 ratio, for example 1600 × 2400 pixels. Stores have their own rules, so check them before publishing.
    • Kindle readers can send the EPUB with Amazon’s Send to Kindle. For older Kindles that only read MOBI, run the result through EPUB to MOBI.
    • Need a printable version too? Use Markdown to PDF or convert the finished book with EPUB to PDF.

    Under the hood

    Markdown is converted with the open-source marked library (GitHub-flavoured Markdown), and code is coloured with highlight.js. Each chapter is cleaned into strict XHTML: invalid nesting is repaired, IDs are made unique and XML-safe, and obsolete tags are replaced with CSS. The book is zipped with JSZip, with the uncompressed mimetype entry first as the EPUB Open Container Format requires.

    The result was tested with W3C EPUBCheck during development and opens in Apple Books, Thorium, Calibre and other EPUB 3 readers; older EPUB 2 readers use the included NCX table of contents.

    Markdown to EPUB Converter FAQ

    How do I convert Markdown to EPUB?

    Paste or open your Markdown, enter the title and author, choose a cover, and press “Create EPUB”. The Markdown to EPUB conversion runs in your browser and the .epub file downloads straight away.

    Can I put the EPUB on my Kindle?

    Yes. Amazon’s Send to Kindle service accepts EPUB files and converts them for your Kindle library. Very old Kindles that cannot use Send to Kindle can read a MOBI made with the EPUB to MOBI converter.

    How are chapters decided?

    By default every # heading starts a new chapter and ## headings become sections. You can also start chapters at ## headings, or keep everything in one chapter.

    Are my images included?

    Yes, if the tool can read them: embedded data URIs, files you add with “Add image files”, and web images whose server allows downloads from other sites. Any image it cannot get is listed after the book is created.

    Is the EPUB valid?

    The tool writes EPUB 3 with an EPUB 2 table of contents for older readers and runs a structure check on every file it creates. During development its output passed W3C EPUBCheck with no errors or warnings.

    Is my manuscript uploaded?

    No. The Markdown, the images and the finished book stay on your device; the page only downloads the open-source converter libraries.

    You might also need