Converts PDFs and other documents to markdown, JSON, chunks, or HTML, with optional LLM assistance for higher accuracy.
microsoft/markitdown
Python utility that converts PDFs, Office documents, HTML, images, audio and more into Markdown for LLM and text analysis pipelines.
- Stars
- 191,206
- Forks
- 14,233
- Open issues
- 740
- Last commit
- 17 days ago
What is it?
MarkItDown is a lightweight Python library and command-line tool that converts files such as PDF, PowerPoint, Word, Excel, HTML, CSV, JSON, XML, EPUB and ZIP archives into Markdown. It aims to preserve document structure like headings, lists, tables and links, so the output can be fed into large language models or other text analysis tools.
The output is designed for machine consumption rather than high-fidelity human reading. Optional dependencies let you install only the formats you need, and Azure Document Intelligence and Azure Content Understanding can be used for cloud-based extraction. Images and audio can be processed with an LLM client for descriptions, and YouTube URLs are supported.
The project also supports third-party plugins, which are disabled by default and can be enabled with a flag. Requires Python 3.10 to 3.14.
Key features
- 01Converts PDF, Office documents, HTML, text formats and ZIP archives to Markdown
- 02Preserves headings, lists, tables and links in the output
- 03Provides both a command-line interface and a Python API
- 04Installs only selected format dependencies via optional extras
- 05Supports Azure Document Intelligence and Azure Content Understanding for cloud extraction
- 06Supports third-party plugins for additional formats
Use cases
- Preparing documents as Markdown context for LLM prompts or retrieval pipelines
- Batch converting Office files and PDFs for text analysis
- Extracting content from YouTube transcripts or audio files into text
- Feeding structured document content into LangChain or AutoGen workflows
Quick start
- 1
Install with pip including all optional dependencies
pip install 'markitdown[all]' - 2
Convert a file to Markdown from the command line
markitdown path-to-file.pdf -o document.md
Things to know
- Output is aimed at text analysis and LLM pipelines, not high-fidelity human-readable conversion.
- Requires Python 3.10 through 3.14.
- Some features such as image descriptions, Document Intelligence and Content Understanding need Azure or LLM API keys and incur costs.
Topics
FAQ
- What is markitdown?
- Python utility that converts PDFs, Office documents, HTML, images, audio and more into Markdown for LLM and text analysis pipelines. MarkItDown is a lightweight Python library and command-line tool that converts files such as PDF, PowerPoint, Word, Excel, HTML, CSV, JSON, XML, EPUB and ZIP archives into Markdown. It aims to preserve document structure like headings, lists, tables and links, so the output can be fed into large language models or other text analysis tools.
- Is markitdown free to use? What license does it have?
- markitdown is open source under the MIT license. Check the license terms before using it in commercial products.
- Is markitdown still maintained?
- Actively maintained. The last commit to markitdown was on Oct 4, 2026.
- What can I use markitdown for?
- Preparing documents as Markdown context for LLM prompts or retrieval pipelines Batch converting Office files and PDFs for text analysis Extracting content from YouTube transcripts or audio files into text Feeding structured document content into LangChain or AutoGen workflows
- How do I install markitdown?
- Install with pip including all optional dependencies: pip install 'markitdown[all]' Convert a file to Markdown from the command line: markitdown path-to-file.pdf -o document.md
- Where can I get markitdown?
- The source code and installation instructions are on GitHub: https://github.com/microsoft/markitdown
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source document parser that converts PDFs, Office files and images into Markdown or JSON for LLM and agent workflows.
Open-source document parser that converts PDF, Office, HTML and other files into structured data for generative AI pipelines.
A Rust library and CLI that converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV and PDF files into clean GitHub-Flavored Markdown.
A low-level Python framework for building stateful, long-running agents with durable execution, human-in-the-loop and memory.
An opinionated, batteries-included agent harness for Python that runs long multi-step tasks out of the box on LangGraph.