Microsoft Markitdown vs Pandoc 2026: Best Document Converter for EPUB Workflows
On June 11, 2026, Microsoft open-sourced Markitdown — a Python library that converts Office documents (DOCX, PPTX, XLSX) to clean Markdown with one command. The release made waves in the document processing community because it fills a specific gap: getting structured content out of proprietary Office formats and into a universal text format that can then become anything — including EPUB.
If you already know Pandoc, the legendary Swiss Army knife of document conversion, you might wonder: do I need both? Which one is better for creating EPUBs? This article compares Markitdown and Pandoc head-to-head, shows you how they complement each other, and builds a complete Office-to-EPUB pipeline using both tools.
What Is Microsoft Markitdown?
Markitdown is a Python library (pip installable as markitdown) that takes Office files — Word documents, PowerPoint presentations, Excel spreadsheets — and converts them to Markdown. It handles:
- DOCX — headings, lists, tables, bold, italic, images, hyperlinks
- PPTX — slide titles, body text, speaker notes, embedded images
- XLSX — cell values, sheet names, table structure
- ZIP-based Office files — legacy formats as well
It is not a general-purpose converter like Pandoc. It only converts from Office formats to Markdown — it does not go the other direction, and it does not output EPUB, HTML, PDF, or any other format directly.
What Markitdown does well is preserve the semantic structure of Office documents. Headings become proper # headings, lists become - bullet lists, tables become Markdown tables. The output is clean enough to paste directly into a Markdown editor, a static site generator, or a Pandoc pipeline.
What Is Pandoc?
Pandoc is the universal document converter that has been the gold standard for over a decade. It converts between virtually every document format — Markdown, HTML, LaTeX, EPUB, DOCX, PDF, reStructuredText, AsciiDoc, Jupyter Notebooks, and dozens more.
Where Markitdown is a focused one-way tool, Pandoc is a mesh: you can convert any input format to any output format, and the intermediate representation (Pandoc's AST) preserves document structure faithfully across the conversion.
Pandoc's EPUB output is particularly strong. It produces valid EPUB 3 files with proper navigation, metadata, CSS styling, and cover images. Many self-publishers and technical authors use Pandoc as their EPUB generation engine.
Head-to-Head Comparison
| Feature | Markitdown | Pandoc |
|---|---|---|
| Input formats | DOCX, PPTX, XLSX (Office only) | DOCX, HTML, Markdown, LaTeX, EPUB, CSV, Jupyter, and 30+ more |
| Output formats | Markdown (one format) | EPUB, HTML, PDF, DOCX, LaTeX, Markdown, and 50+ more |
| EPUB output | No (converts to Markdown only) | Yes — full EPUB 2/3, custom CSS, metadata, navigation |
| Table handling | Good — simple tables convert cleanly | Excellent — complex tables, merged cells, multi-row headers |
| Image extraction | Yes (writes embedded images to files) | Yes (embeds in EPUB or writes to external files) |
| Speed | Very fast (lightweight Python library) | Fast (Haskell — compiled) |
| License | MIT (Microsoft, June 2026) | GPL-2.0 (open-source since 2007) |
| Install | pip install markitdown |
brew install pandoc or apt install pandoc |
Markitdown in Action
Using Markitdown is straightforward. Install the package, import the library, and pass your file path:
pip install markitdown
from markitdown import MarkItDown
md = MarkItDown()
result = md.convert("report.docx")
print(result.text_content)
The output is a clean Markdown string. For a DOCX file with multiple headings, bullet lists, and a table, the output looks like this:
# Q2 2026 Engineering Report
## Executive Summary
Team velocity increased 23% quarter-over-quarter.
Key deliverables shipped on schedule.
## Metrics
| Metric | Q1 2026 | Q2 2026 | Change |
|--------|---------|---------|--------|
| Shipments | 12 | 18 | +50% |
| Bugs found | 47 | 38 | -19% |
| Coverage | 78% | 84% | +6pp |
Note that images in the DOCX are extracted as separate files. Markitdown writes them to a folder alongside the output Markdown file, referencing them with relative paths.
Pandoc in Action: Markdown to EPUB
Once Markitdown gives you clean Markdown, Pandoc takes it to EPUB:
pandoc report.md -o report.epub --metadata title="Q2 2026 Engineering Report" --metadata author="Engineering Team" --css=epub-style.css --toc
This single command produces a valid EPUB 3 file with:
- Auto-generated table of contents (from Markdown headings)
- Custom CSS styling (fonts, colors, margins)
- Proper metadata (title, author, language)
- EPUB navigation (NCX and nav.xhtml)
Pandoc also handles more complex scenarios. For a multi-chapter book, pass each chapter file and let Pandoc merge them:
pandoc chapter-01.md chapter-02.md chapter-03.md -o my-book.epub --metadata title="My Book Title" --epub-cover=cover.png --toc-depth=2
The Complete Workflow: Office to EPUB
The real power of these two tools is using them together. Here is the pipeline:
- Markitdown extracts structured Markdown from your Office file
- Pandoc converts that Markdown to a polished EPUB
- Enjoy your ebook on any device
Step 1: Extract Markdown
from markitdown import MarkItDown
md = MarkItDown()
result = md.convert("manuscript.docx")
with open("manuscript.md", "w") as f:
f.write(result.text_content)
Step 2: Convert to EPUB
pandoc manuscript.md -o manuscript.epub --metadata title="My Manuscript" --metadata author="Author Name" --metadata lang="en-US" --toc --toc-depth=3 --css=manuscript.css
Step 3: Optional — use converter-epub.com
If you prefer a browser-based approach or need to make quick adjustments, upload your Markdown file to converter-epub.com to produce a clean EPUB without installing any tools.
When to Use Markitdown (and When to Skip It)
Markitdown is the right choice when:
- Your source is Office format — DOCX, PPTX, or XLSX files where you need clean Markdown output
- You want a quick, scriptable extraction — batch processing hundreds of Office documents
- You need semantic preservation — Markitdown preserves heading hierarchy, list nesting, and table structure better than Pandoc's DOCX reader in some cases
- You are building a data pipeline — integrate into LLM workflows, RAG systems, or content management
Skip Markitdown when:
- Your source is anything other than Office — Markitdown only handles three formats
- You need direct EPUB output — Markitdown has no EPUB capability; combine with Pandoc
- You are starting from Markdown — Pandoc alone handles all your conversion needs
When to Use Pandoc (and When to Supplement It)
Pandoc is the right choice when:
- You need EPUB output — Pandoc's EPUB support is production-grade and time-tested
- You work across multiple formats — LaTeX to EPUB, HTML to DOCX, Markdown to PDF — Pandoc handles them all
- You need fine-grained control — custom CSS, metadata templates, filters, and Lua scripting
- You are writing a book — multi-chapter merging, cover images, TOC depth control, and cross-references
Supplement Pandoc with Markitdown when:
- Your source is a complex Office file — Pandoc's DOCX reader is good, but Markitdown's extraction is more faithful for styling-heavy documents
- You want a two-step pipeline — Markitdown → clean Markdown → Pandoc → EPUB gives you a natural editing checkpoint in between
Comparison with Other Alternatives
| Tool | Best For | EPUB Output | Office Input | Scriptable |
|---|---|---|---|---|
| Markitdown + Pandoc | Office-to-EPUB pipeline | ✅ Excellent | ✅ Excellent | ✅ Python + CLI |
| Pandoc alone | General format conversion | ✅ Excellent | ✅ Good | ✅ CLI + Lua |
Calibre ebook-convert |
EPUB-centric batch conversion | ✅ Excellent | ✅ Good | ✅ CLI |
| converter-epub.com | Quick browser-based conversion | ✅ One-click | ✅ DOCX, PDF, TXT | N/A (web only) |
| Sigil | Manual EPUB editing | ✅ Native | ❌ Import only | ❌ GUI |
Frequently Asked Questions
Does Markitdown replace Pandoc for EPUB creation?
No. Markitdown only converts Office files to Markdown — it has no EPUB output capability. For EPUB creation, you need Pandoc (or another EPUB generator) as the second step. The two tools are complementary, not competitive.
Is Markitdown better than Pandoc for DOCX-to-Markdown conversion?
For most documents, yes. Markitdown is built specifically for Office extraction and tends to preserve table structure, heading hierarchy, and list nesting more faithfully. Pandoc's DOCX reader is excellent, but Markitdown's focused design gives it an edge for styling-heavy Word documents. For simple documents, the difference is negligible.
Can I use Markitdown and Pandoc together in an automated pipeline?
Yes — this is the recommended approach for Office-to-EPUB workflows. Use Markitdown to extract clean Markdown from your DOCX/PPTX/XLSX file, optionally edit the Markdown (this is a natural editorial checkpoint), then feed the Markdown into Pandoc for EPUB generation. The entire pipeline can be scripted in a few lines of Python and shell.
Which tool preserves DOCX tables better for EPUB output?
Markitdown produces cleaner Markdown tables from DOCX files, which Pandoc then renders faithfully in EPUB. Going directly from DOCX to EPUB with Pandoc also works well, but Markitdown's intermediate Markdown gives you a chance to verify and adjust the table formatting before EPUB generation. For documents with more than 40 rows or merged cells, the two-step approach is noticeably more reliable.
Does Markitdown handle PowerPoint speaker notes?
Yes. Markitdown extracts speaker notes from PPTX files and includes them in the Markdown output, typically as blockquotes after each slide's content. This makes it useful for converting presentation decks into readable documents — perfect for conference talks or lecture notes that you want to distribute as EPUB ebooks.
Can Pandoc convert EPUB back to DOCX or Markdown?
Yes — Pandoc handles reverse conversion. Use pandoc input.epub -o output.docx to convert an EPUB back to a Word document, or pandoc input.epub -o output.md for Markdown. This is useful when someone sends you an EPUB and you need to edit it in Word or your preferred Markdown editor. Markitdown cannot do this — it only goes one direction (Office to Markdown).
Conclusion
Microsoft Markitdown and Pandoc are not competitors — they are the two halves of a complete document-to-EPUB pipeline. Markitdown excels at extracting clean, structured Markdown from Office files, while Pandoc transforms that Markdown (or any other format) into polished, publication-ready EPUB files.
For a quick Office-to-EPUB workflow in 2026:
- Office file at hand? Run Markitdown to get Markdown, then Pandoc to create the EPUB
- Already have Markdown? Skip Markitdown — Pandoc alone handles the EPUB conversion
- Need a quick browser-based conversion? Use converter-epub.com for DOCX, PDF, or TXT to EPUB
- Prefer a desktop tool? Calibre's ebook-convert is another excellent option for EPUB-first workflows
The Markitdown release by Microsoft (June 2026) fills a real gap in the open-source document processing ecosystem. Combined with Pandoc's universal conversion engine, you now have a free, scriptable, and production-ready pipeline that turns any Office document into a beautiful EPUB ebook. For a quick browser-based alternative that keeps your files completely private, try converter-epub.com — no uploads, no server processing. Read our privacy and safety guide to understand how local browser conversion protects your data.