
MarkItDown
Convert PDFs, Office files, and images to Markdown, free
Replaces Unstructured Io, Google Document Ai, Amazon Textract

Who it's for
MarkItDown converts common document formats into Markdown before chunking and embedding.
your source data already arrives as clean Markdown or JSON.
the CLI can batch convert Word, Excel, PowerPoint, and PDF files.
you need exact visual layout preservation.
the Python API fits backend conversion steps.
users upload untrusted files and you cannot sandbox conversion.
The problem
LLM pipelines break when source documents arrive as PDFs, slide decks, spreadsheets, images, audio files, or mixed archives. Raw extraction often loses headings, tables, links, and other structure that helps models understand the content. Teams usually patch this with one parser per file type, then spend time normalizing output before indexing or analysis. That slows down ingestion work and creates security concerns when untrusted files run through broad conversion code with too many permissions.
How it works
Converts PDF, PowerPoint, Word, Excel, images, audio, HTML, CSV, JSON, XML, ZIP archives, YouTube URLs, and EPUBs into Markdown.
CLI usage supports shell pipelines, such as converting a PDF and redirecting Markdown output to a file.
Python API exposes MarkItDown conversion inside ingestion jobs, evaluation scripts, and document-processing services.
Markdown output preserves useful structure such as headings, lists, tables, and links for LLM and search workflows.
PyPI package supports optional extras through `markitdown[all]` for broad file-format coverage.
Features
- Broad file conversion
- CLI pipeline support
- Python API
- LLM-ready Markdown output
- Optional PyPI extras
How to install
pip install markitdown[all] markitdown path-to-file.pdf > document.md from markitdown import MarkItDown md = MarkItDown() result = md.convert("test.xlsx") print(result.text_content)
Recommended for this setup
Strengths
- Built for LLM ingestion: MarkItDown focuses on LLM-ready Markdown rather than pixel-perfect document reproduction, which matches RAG and text analysis needs.
- Messy input coverage: The supported format list covers the messy inputs teams actually receive, including Office files, images, audio, archives, and web formats.
- MIT license: The MIT license makes it practical to embed in internal ingestion systems and commercial AI products.
- CLI and API workflows: The CLI and Python API support both quick local conversions and repeatable batch pipelines.
Trade-offs
- Not for pixel-perfect conversion: MarkItDown is not meant for high-fidelity human-facing document conversion, so layout-heavy PDFs or slide decks may need a different tool.
- Untrusted inputs need sandboxing: The project warns that conversion runs with the privileges of the current process, so untrusted inputs require sandboxing and narrow conversion functions.
- Optional dependencies required: OCR, audio transcription, and optional format support depend on installed extras and external dependencies.
Tech stack
FAQ
MarkItDown supports PDFs, Word, PowerPoint, Excel, images with OCR metadata, audio with transcription metadata, HTML, CSV, JSON, XML, ZIP files, YouTube URLs, EPUBs, and more. Exact support depends on installed extras and optional dependencies.
Not as the primary goal. MarkItDown optimizes for Markdown that works well in LLM and text analysis pipelines, not perfect visual reproduction for people.
Use caution. The project states that MarkItDown performs I/O with the privileges of the current process, so untrusted inputs should run in a restricted environment with narrow conversion functions.