EPUB to Markdown Converter
Drop an EPUB file to inspect its metadata and chapters, then follow the step-by-step guide to convert it to clean Markdown.
Drop your EPUB file here
or click to browse
Drop an EPUB file on the left
to inspect its metadata and chapter list.
Metadata
Chapters / Spine
Ready-to-Run Pandoc Command
Method 1 — Pandoc (Recommended)
Pandoc is a free command-line tool that converts between document formats. It produces clean, structured Markdown from EPUB in seconds.
Step 1 — Install Pandoc
# macOS (Homebrew)
brew install pandoc
# Windows (Winget)
winget install JohnMacFarlane.Pandoc
# Debian / Ubuntu
sudo apt install pandoc
Step 2 — Basic conversion
pandoc input.epub -o output.md
Outputs a single Markdown file with all chapters concatenated.
Step 3 — With images extracted
pandoc input.epub \
--extract-media=./media \
-o output.md
Images are saved to ./media/ and referenced by relative paths in the Markdown.
Step 4 — GitHub Flavored Markdown
pandoc input.epub \
-t gfm \
--extract-media=./media \
-o output.md
Use -t gfm for GitHub or -t commonmark for CommonMark output.
Step 5 — Split into one file per chapter
pandoc input.epub \
--split-level=1 \
-o output.md
--split-level=1 creates a separate .md file for each top-level heading (chapter).
Method 2 — Calibre (GUI)
Calibre is a free ebook management app with a built-in converter. Markdown is not a native output format, but you can convert to TXT then clean it up, or use the ebook-convert CLI with Pandoc as a second pass.
Step 1 — Install Calibre
Download from calibre-ebook.com. Available for Windows, macOS, and Linux.
Step 2 — Convert EPUB to HTMLZ via CLI
ebook-convert input.epub output.htmlz
HTMLZ is a zipped HTML archive — each chapter is a clean HTML file.
Step 3 — Unzip and convert HTML to Markdown
unzip output.htmlz -d book_html
pandoc book_html/index.html -o output.md
The intermediate HTMLZ step often produces cleaner Markdown than converting EPUB directly, especially for complex formatting.
Which method should I use?
- Clean EPUB with few images: use Pandoc directly (Method 1).
- Complex layout or unusual encoding: try Calibre HTMLZ first, then Pandoc.
- Need a GUI with no command line: use Calibre desktop app.
- Batch processing hundreds of files: script with Pandoc in a shell loop.
Post-Conversion Tips
Clean up whitespace
EPUB often has extra blank lines and soft hyphens (). Run a find-and-replace in VS Code or use sed to remove them.
Footnotes
Pandoc converts EPUB footnotes to standard Markdown footnote syntax ([^1]). Most static site generators support this natively.
Tables
HTML tables in EPUB become pipe-style Markdown tables. GFM and Pandoc's extended Markdown both render them. CommonMark does not — use -t gfm if tables matter.
Summary
Drop an EPUB file to inspect its metadata and chapters, then follow the step-by-step guide to convert it to clean Markdown.
How it works
- Drop or select an EPUB file — it is read locally using JSZip, never uploaded.
- The tool unzips the EPUB container, parses the OPF manifest, and extracts title, author, language, publisher, and chapter list.
- Chapter file names and reading order are displayed so you know what the EPUB contains.
- Switch to the Conversion Guide tab for step-by-step Pandoc and Calibre instructions.
- Copy the ready-to-run Pandoc command for your file and paste it into a terminal.
Use cases
- Inspect an EPUB before running a batch conversion pipeline.
- Convert ebooks to Markdown for ingestion into LLM or RAG workflows.
- Migrate ebook content to a static site generator like Hugo or Jekyll.
- Archive purchased ebooks as plain Markdown for long-term portability.
- Prepare EPUB content for a Markdown-based knowledge base or wiki.
- Extract chapter structure to plan a content outline or table of contents.
- Verify EPUB metadata (language, author, identifier) before distribution.
- Convert technical documentation packaged as EPUB to editable Markdown.