microsoft/markitdown

microsoft/markitdown is a lightweight Python utility created to convert diverse file formats and office documents into structured Markdown for use with large language models and related text analysis pipelines. The tool focuses on preserving key structural elements, including headings, lists, tables, and hyperlinks. It supports conversions from PDF, PowerPoint, Word, Excel, images with EXIF metadata and OCR, audio recordings with speech transcription, HTML, text-based formats such as CSV, JSON, and XML, ZIP archives, YouTube URLs, and EPUBs. In the project documentation, the tool is compared directly to textract, highlighting MarkItDown's distinct emphasis on preserving structured Markdown suitable for text analysis. Security guidance notes that MarkItDown operates with the privileges of the running process, accessing any resources reachable by that process, so input sanitization and narrow conversion functions are advised in untrusted environments.

Prerequisites require Python 3.10 through 3.14, and using an isolated virtual environment is recommended to prevent dependency conflicts. Users can install the package with pip using the command "pip install 'markitdown[all]'", or build from source by cloning the repository and running "pip install -e 'packages/markitdown[all]'". Modular optional dependencies are available for selective setups, including packages for PDF, DOCX, PPTX, XLSX, audio transcription, and Azure Content Understanding. Basic command-line execution runs via "markitdown path-to-file.pdf -o document.md" or piped input. The GitHub snapshot shows the repository is not archived and records an MIT license.

Data as of : 193636 stars · 14529 forks.

GitHub · textract