MarkItDown
Convert files and office documents to Markdown for LLMs
About MarkItDown
MarkItDown is a lightweight Python utility from Microsoft for converting files into Markdown so they can be fed to a language model or a text-analysis pipeline. It handles PDF, Word, PowerPoint, Excel, images (EXIF metadata and OCR), audio (EXIF metadata and speech transcription), HTML, CSV, JSON, XML, ZIP archives, EPUB files and YouTube URLs. The README is careful about what it is for: the output preserves document structure as Markdown - headings, lists, tables, links - and is meant to be consumed by tools, not to be a high-fidelity conversion for humans to read. The closest comparison it draws is textract, with more attention paid to structure.
It solves the step that sits before every retrieval or summarisation pipeline and that most people underestimate: getting a heap of office documents into a form a model reads well. Markdown is the right target because mainstream models have been trained on enormous amounts of it and it is token-efficient. The project is MIT licensed, installs with pip install 'markitdown[all]', and carries 182,613 GitHub stars and 13,425 forks. It is not new - the repository dates from November 2024 - and the version is still 0.1.7, which is the honest counterweight to the star count: a very widely used tool that has never declared a stable API. There is a plugin system, an optional MCP server package, and optional routing to two billable Azure services for harder documents.
Install the package with the optional dependencies for the formats you need, either everything with [all] or individually with, for example, [pdf, docx, pptx]. From the command line, markitdown path-to-file.pdf prints Markdown; from Python, create a MarkItDown instance and call convert() on a path, a stream or a URL. Plugins are disabled by default and enabled per run with --use-plugins; the official markitdown-ocr plugin adds LLM-vision OCR to embedded images in PDF, DOCX, PPTX and XLSX if you pass it an OpenAI-compatible client, and skips silently if you do not. For documents where the built-in converters are not good enough, the package can route conversion to Azure Document Intelligence or Azure Content Understanding, the latter adding structured field extraction as YAML front matter. The README's comparison table is explicit that the built-in path costs local compute only and both Azure paths are billable API calls. One warning from the README worth repeating: the library performs I/O with the privileges of the calling process, so sanitise inputs in untrusted settings and call the narrowest convert_* function you can.
- •Broad Format Coverage - PDF, Word, PowerPoint, Excel, images, audio, HTML, CSV, JSON, XML, ZIP, EPUB and YouTube URLs
- •Structure-Preserving Markdown - Headings, lists, tables and links survive the conversion, which is what a model needs
- •CLI and Python API - One-line conversions from the shell or
convert()calls from code, with a separate MCP server package - •Plugin System - Third-party converters discoverable by the
#markitdown-plugintag, plus the official OCR plugin - •Optional Azure Routing - Document Intelligence and Content Understanding for hard documents, at Azure's per-call prices
- •MIT Licensed - Free to embed in commercial pipelines with no usage restrictions
Developers building RAG, summarisation or extraction pipelines who need a dependable first step for office documents, and anyone who wants a one-line CLI to turn a PDF into something a model can read. It pairs naturally with the vector stores and agent frameworks already in this directory. It is not the right tool if you need publication-quality conversion for people to read, if your documents are mostly complex scanned PDFs (the weak spot of every tool in this class, and MarkItDown does not claim otherwise), or if you need a stable API contract for a long-lived product - a 0.x version with 317 open issues is a signal to pin your dependency.
Pricing
No pricing page found
Free and MIT licensed; the built-in converters run on local compute only. Optional Azure Document Intelligence and Content Understanding routing is billed per call by Azure.
Checked 2026-09-15











