markitdown

microsoft

A Python tool from Microsoft that converts PDFs, Word, Excel and PowerPoint files, images, audio and more into Markdown. It is built for feeding documents to language models while keeping headings, lists and tables intact.

PythonCreated

What is microsoft/markitdown?

MarkItDown is a lightweight Python utility from Microsoft that converts a range of files, including PDFs, Word and Excel documents, PowerPoint slides, images and other formats, into Markdown. It is designed for language-model and text-analysis pipelines, so it tries to keep the document's structure, such as headings, lists, tables and links, rather than producing plain text. It is most comparable to textract, with a stronger focus on structure.

The README warns that the library performs input and output with the privileges of the process running it, so inputs from untrusted sources should be sanitised, and the narrowest conversion function should be used for each job. It also notes that conversion quality varies by format.

It suits developers building retrieval or summarisation pipelines that need documents as clean text, and anyone who wants to turn office files into Markdown from the command line.

autogenautogen-extensionlangchainmarkdownmicrosoft-officeopenaipdf