markitdown
by microsoft
Python tool from Microsoft that converts PDFs, Word, Excel, PowerPoint and other files into Markdown for use with AI.
- Stars
- 198,322 stars
- Forks
- 15k forks
- Last push
- 18 days ago
- Activity
- Active
# Install with all file formats$ pip install 'markitdown[all]'# Convert a PDF to Markdown$ markitdown path-to-file.pdf -o document.mdCommands from the project's README. Run them after installing (see below).
Overview
Understand markitdown in 60 seconds
- What it does
- MarkItDown is a small Python tool from Microsoft that converts files such as PDF, Word, PowerPoint, Excel, HTML, images and audio into Markdown. It is made for feeding documents into language models and text pipelines.
- The problem it solves
- Language models work best with plain text that keeps headings, lists, tables and links. MarkItDown turns office documents and other files into that kind of Markdown, which is also token-efficient.
- Why choose it
- Choose it for a lightweight, well-known converter that covers many formats from one command or Python call. Its output is meant for machines; for high-fidelity documents meant for people, a dedicated converter may be better.
- Who should use it
- Developers building RAG or document pipelines
- Anyone feeding PDFs or Office files to an LLM
- Data teams extracting text from mixed file types
- Python developers who need a simple converter
- Setup difficulty
You'll need:
- Python 3.10 to 3.14
- A virtual environment is recommended
How markitdown works
MarkItDown converts PDF, PowerPoint, Word, Excel, images (metadata and captions), audio (metadata and transcription), HTML, CSV, JSON, XML, ZIP files, YouTube URLs and EPubs into Markdown. It focuses on keeping structure such as headings, lists, tables and links.
You can use it as a command-line tool or as a Python library. Optional dependencies let you install only the formats you need, for example markitdown[pdf, docx, pptx]. Third-party plugins are supported but disabled by default.
The README notes that image captioning and speech transcription rely on web-hosted services, and that MarkItDown reads files with the permissions of the running process, so inputs should be sanitized in untrusted environments.
Features
Key features
Many formats
PDF, Word, PowerPoint, Excel, HTML, images, audio, EPub, ZIP and more.
LLM-friendly output
Keeps document structure in compact Markdown.
CLI and Python API
Convert from the terminal or in your own code.
Pick your formats
Optional extras install only the converters you need.
Plugins
Supports third-party plugins, off by default.
Azure Document Intelligence
Optional integration for higher-quality extraction.
Strengths
- Simple to install and use
- Covers a wide range of file types
- Backed by Microsoft
- MIT licensed
Limitations
- Output is for text analysis, not pixel-perfect conversions
- Image captioning and transcription need web services
- Reads anything the running process can access, so sanitize untrusted inputs
Practical use cases
Prepare documents for RAG
Convert a folder of PDFs and Word files to Markdown before indexing.
Give an LLM a spreadsheet
Turn an Excel file into a Markdown table for a prompt.
Transcribe audio to text
Use the audio extra to get speech transcripts in Markdown.
Installation
Install markitdown
Commands come from MarkItDown's README. AIRepoHub hasn't run them yet. View source
Prerequisites
- Python 3.10–3.14
Supported systems
- Windows
- macOS
- Linux
- 1
Create a virtual environment
Shellpython -m venv .venvsource .venv/bin/activate - 2
Install MarkItDown with all formats
Shellpip install 'markitdown[all]'
- 1
Clone and install
Shellgit clone git@github.com:microsoft/markitdown.gitcd markitdownpip install -e 'packages/markitdown[all]'
Configuration and API keys
| Setting | What it's for |
|---|
First run
- 1
Convert a file
Shellmarkitdown path-to-file.pdf > document.md
markitdown's documentation doesn't include sample output, so we don't show any. Expect the results in your terminal.
Your first project
Convert a PDF into Markdown for an LLM
Turn a PDF into clean Markdown you can paste into a prompt or index for search.
Before you start
- Python 3.10–3.14
- MarkItDown installed with pip install 'markitdown[all]'
- 1
Convert the file
Shellmarkitdown path-to-file.pdf -o document.md - 2
Or pipe content in
Shellcat path-to-file.pdf | markitdown - 3
Install only what you need next time
Shellpip install 'markitdown[pdf, docx, pptx]'
What to expect
A document.md file with the PDF's text and structure as Markdown.
Next steps
- Use it from Python in your own pipeline
- List plugins with markitdown --list-plugins
- Try the Azure Document Intelligence extra for harder documents
Costs and requirements
What it costs to run
- License
- MIT. Free to use, modify and use commercially.Free
- Software
- Free and open source.Free
- Optional services
- Image captioning, transcription and Azure integrations may use paid web services.Depends
Troubleshooting
Common setup issues
A file format isn't converted
Install the matching optional dependency, such as markitdown[pdf] or markitdown[all].
Dependency conflicts during install
Use a virtual environment (venv, uv or conda) as the README recommends.
Plugins don't run
Plugins are disabled by default. Use --use-plugins.
Alternatives
Similar AI repositories
transformers
huggingface
Hugging Face library for defining, running and training machine learning models for text, vision and audio.
langchain
langchain-ai
Framework for building LLM-powered applications and agents.
pytorch
pytorch
Python framework for building and training neural networks with tensors and GPU acceleration.
Scrapling
D4Vinci
Python web scraping framework for collecting data from websites, from single pages to full crawls.