---
title: "EPUB to Markdown Converter"
description: "EPUB to Markdown is a converter that turns an ebook's chapters into structured Markdown, billed at 1 credit per 1,800 characters of output. The anonymous trial accepts EPUB files up to 10 MB and 25 pages."
url: https://markitdown.ai/epub-to-markdown
updated: 2026-09-28
source: markitdown.ai
---

# EPUB to Markdown Converter

> EPUB to Markdown is a converter that turns an ebook's chapters into structured Markdown, billed at 1 credit per 1,800 characters of output. The anonymous trial accepts EPUB files up to 10 MB and 25 pages.

## How to convert EPUB to Markdown

- Upload a DRM-free .epub file in the EPUB to Markdown converter. The converter reads the whole book, so check the credit estimate for its length before you start.
- Review the EPUB to Markdown output against the book. Check the chapter headings, a part or volume break, an illustration caption and the final chapter before reusing the text.
- Copy or download the reviewed EPUB to Markdown result. Longer books and repeated conversions need a Lite, Pro or Max subscription; each plan has its own per-file page limit.

## Why use EPUB to Markdown

- Chapters as headings — Books, parts and chapters become nested Markdown headings, so a long ebook keeps an outline you can navigate and split.
- No contents clutter — The ebook's own linked contents page is removed, so the Markdown starts with the book instead of hundreds of links.
- Captions kept apart — Illustration captions and meaningful alt text become separate lines instead of running into chapter titles.
- Title and author up front — The book's title, author and language from its metadata sit at the top of the file for your records.
- Credits known in advance — The estimate shows the page count and credits for the whole book before you convert, using the same count as the charge.
- Browser and API — Check one book in the browser, then convert a reading list through the EPUB API route with the same results.

## Why ebook exports lose their chapters

- Every heading looks the same — Many ebooks mark books, parts and chapters with the same heading tag, so a flat export cannot tell Book One from Chapter One.
- The contents page repeats — The book's own table of contents becomes hundreds of links at the top of the text, before the first chapter begins.
- Captions leak into titles — Illustrated editions put picture captions inside chapter headings, so a chapter title turns into a sentence from the picture.

## What this EPUB converter keeps

- Chapter hierarchy — When the book's navigation nests chapters under parts, heading levels follow that nesting. When it is flat, a heading with no text of its own that is followed by chapters is treated as a part, and its chapters move one level down.
- Contents pages and internal links — A contents page made of links to the book's own chapters is removed. Links to chapters that remain are kept; links to print page markers and other anchors that do not exist in Markdown become plain text.
- Illustrations — Images are not embedded. A caption or meaningful alt text becomes its own line, such as *[Illustration: …]*, instead of running into a heading or paragraph. Cover images are left out.
- Title, author and language — The book title and author from the package metadata appear at the top of the Markdown, with the language code. Translators and other contributors are not listed as authors.

## EPUB to Markdown in real workflows

- Readers and researchers — Quote, annotate and search a public-domain book in a notes app, with chapter headings to cite.
- AI reading assistants — Build a retrieval index from books so an assistant answers from the right chapter instead of guessing.
- Authors and editors — Move a manuscript exported as EPUB back into Markdown for revision, version control or a static site.
- Digital libraries — Turn a collection of DRM-free titles into plain text archives that stay readable without an ebook reader.

## EPUB to Markdown API

Use POST /v1/convert/epub with an x-api-key header and a supported source file. A completed request can return outputs inline; HTTP 202 means conversion is still running. Read the Location response header and poll it before accessing file outputs. A multipart request accepts at most 100 files; subscription and total request limits also apply. Keep API keys in your server environment. API access requires a Lite, Pro or Max subscription.

```bash
curl -i "https://api.markitdown.ai/v1/convert/epub" \
  -H "x-api-key: $MARKITDOWN_API_KEY" \
  -F "file=@source.epub"
# If HTTP 202, GET the Location URL with the same API key.
```

## Reading order and chapters

EPUB to Markdown follows the book's spine, the reading order the publisher declared, rather than the order files happen to sit inside the archive. Each chapter file becomes consecutive Markdown, and the book's navigation decides how headings nest. That matters for long works: in War and Peace every Book and every Chapter uses the same heading tag, so a flat export shows fifteen books, two epilogues and three hundred and sixty-five chapters at one level. After conversion the books sit one level above their chapters, which is the outline a reader expects and the structure a splitter needs. Check one part break and the last chapter against your reading app before relying on the outline.

## Reviewing the output

Review EPUB to Markdown output by comparing a few landmarks with the book in your usual reader. Open the first chapter, a chapter that starts a new part and the final chapter, then confirm the headings and their levels. Look at one illustrated page: its caption should appear as an illustration line near the text it accompanied, not inside a chapter title. Search the Markdown for a phrase from the middle of the book to be sure nothing was skipped. Front matter such as a publisher's licence or preface is kept, because it is part of the book; remove it yourself if your next step only needs the story text.

## Books for AI and search

Converting an EPUB to Markdown gives a language model or a retrieval index text with its chapter boundaries intact. Split on chapter headings rather than on a fixed number of characters, and keep the book title and chapter name with every passage so an answer can point back to where it came from. A whole novel is far longer than most model context windows, so plan to retrieve relevant chapters instead of pasting the entire book into ChatGPT or Claude. The emphasis and quotation marks in the Markdown keep dialogue readable, which helps when you check a quoted passage against the original.

## Choosing the EPUB

EPUB to Markdown needs a DRM-free file. Public-domain editions from Project Gutenberg or Standard Ebooks, your own manuscripts exported from a writing app and publisher review copies without copy protection all work. A book bought from a store that locks files to its reader app is encrypted and cannot be converted; the Markdown would be empty or rejected. If the same title is available as EPUB and PDF, choose the EPUB: its text and chapter structure are already there, while a PDF has to have its layout interpreted first. Use the latest edition you have, because corrected editions fix typos that conversion will otherwise faithfully copy.

## Credits for a whole book

An EPUB has no fixed pages: text reflows to fit the reader's screen. EPUB to Markdown therefore bills by the length of the Markdown it produces, counting one page for every 1,800 characters at 1 credit per page. A full novel is long. Pride and Prejudice from Project Gutenberg converts to about 738,774 characters, which is 411 pages and 411 credits. War and Peace converts to about 3,222,019 characters, or 1,791 credits. The estimate shown before you convert uses the same count, so you see the number before any credits are spent.

- Anonymous trial: one EPUB up to 10 MB and 25 pages, about 45,000 characters. That covers a short story or a few chapters, not a typical novel.
- Lite: 150 credits a month and a 100-page limit per file, about 180,000 characters of Markdown.
- Pro: 500 credits a month and a 200-page limit per file, about 360,000 characters. Pride and Prejudice, at 411 pages, is over this limit.
- Max: 1200 credits a month and no per-file page limit, so a whole novel converts in one file as long as your balance covers it. War and Peace needs 1,791 credits, more than one month of Max; annual billing grants twelve months of credits up front.
- A book over your plan's per-file limit is rejected before conversion and nothing is charged. Split it into smaller EPUB files, or upgrade.

## Example: War and Peace, Book One, Chapter I

Source: Project Gutenberg #2600, War and Peace (EPUB), converted by markitdown.ai on 2026-09-28

```markdown
## BOOK ONE: 1805

### CHAPTER I

“Well, Prince, so Genoa and Lucca are now just family estates of the Buonapartes. But I warn you, if you don’t tell me that this means war, if you still try to defend the infamies and horrors perpetrated by that Antichrist—I really believe he is Antichrist—I will have nothing more to do with you and you are no longer my friend, no longer my ‘faithful slave,’ as you call yourself! But how do you do? I see I have frightened you—sit down and tell me all the news.”

It was in July, 1805, and the speaker was the well-known Anna Pávlovna Schérer, maid of honor and favorite of the Empress Márya Fëdorovna. With these words she greeted Prince Vasíli Kurágin, a man of high rank and importance, who was the first to arrive at her reception. Anna Pávlovna had had a cough for some days. She was, as she said, suffering from *la grippe; grippe* being then a new word in St. Petersburg, used only by the elite.

```

## FAQ

### How does EPUB to Markdown work?

EPUB to Markdown reads the chapters in the book's reading order and writes them as Markdown with headings, emphasis, lists and links. The anonymous trial accepts one EPUB up to 10 MB and 25 pages, with 3 conversions per IP per hour and 10 a day.

### How many credits does an EPUB book use?

An EPUB book uses 1 credit for every 1,800 characters of Markdown it produces. Pride and Prejudice uses about 411 credits and War and Peace about 1,791. The estimate before conversion uses the same count.

### Which plan can convert a whole novel?

Max can convert a whole novel in one file, because Max has no per-file page limit; Lite allows 100 pages per file and Pro 200. Your credit balance still has to cover the book.

### Are chapter and part headings kept?

Yes. Chapter and part headings are kept and levelled from the book's navigation, so Book One can sit above Chapter I instead of beside it.

### What happens to images in an EPUB?

Images in an EPUB are not embedded in the Markdown. Captions and meaningful alt text are kept as separate illustration lines; the cover image is left out.

### Can I convert an EPUB with DRM?

No. An EPUB with DRM is encrypted and cannot be read. Convert a DRM-free EPUB, such as a public-domain title or a file you exported yourself.

### Is EPUB to MD the same as EPUB to Markdown?

Yes. EPUB to MD means the same conversion: .md is the usual file extension for Markdown, and the download is a .md file.

### Do I need an account to try an EPUB?

No. The anonymous trial lets you preview and copy the result of a short EPUB. A Lite, Pro or Max subscription is needed for longer books, saved history, batch and API access.

### Can I convert EPUB to Markdown with the API?

Yes. POST the .epub to /v1/convert/epub with an API key; the estimate endpoint /v1/convert/epub/estimate returns pages and credits first. See /developers.

## Sources

- [EPUB 3.3 (W3C Recommendation)](https://www.w3.org/TR/epub-33/)
- [CommonMark Spec](https://spec.commonmark.org/)

## Related

- [Markdown converter for documents and web pages.](https://markitdown.ai/)
