Skip to main content
Document Conversion Made Simple

MarkItDown

Transform your documents into clean, structured Markdown: PDF, Word, PowerPoint, Excel, and more with the powerful Python conversion library.

MarkItDown is an open-source Python library from Microsoft for converting supported files into Markdown. To-Markdown provides a web interface around document-conversion workflows for content teams, developers, and documentation projects.

10+
File Formats Supported
.md
Editable Output
--
GitHub Stars

Supported Formats

PDF Files (.pdf)

Extract supported text and structure; complex layouts may need review

PowerPoint (.pptx, .ppt)

Transform presentations into structured markdown. Legacy .ppt support via ppt.to-markdown.com

Word (.docx, .doc)

Convert supported Word structure. Legacy .doc files use the Word converter

Excel (.xlsx, .xls)

Convert supported cell values to Markdown tables. Legacy .xls files use the Excel converter

Images

Extract EXIF metadata and perform OCR on images

Audio

Extract metadata and transcribe speech to text

HTML & Text

Convert HTML (including Wikipedia), CSV, JSON, XML and other text formats

ZIP Archives

Automatically process and convert all compatible files within ZIP archives

More Formats

Additional formats are being added regularly. Check our documentation for the latest supported formats.

Installation

Install MarkItDown using pip:

pip install markitdown

Or install from source:

git clone https://github.com/microsoft/markitdown
cd markitdown
pip install -e .

Usage Examples

Basic usage:

from markitdown import MarkItDown

markitdown = MarkItDown()
result = markitdown.convert("test.xlsx")
print(result.text_content)

Using with LLM for image description:

from markitdown import MarkItDown
from openai import OpenAI

client = OpenAI()
md = MarkItDown(llm_client=client, llm_model="gpt-4o")
result = md.convert("example.jpg")
print(result.text_content)

Command-line usage:

# Convert a file
markitdown path-to-file.pdf > document.md

# Pipe content
cat path-to-file.pdf | markitdown

Docker Usage

docker build -t markitdown:latest .
docker run --rm -i markitdown:latest < ~/your-file.pdf > output.md

Resources

Documentation - Comprehensive guides unofficial documentation
Code Repository - Sample implementations and use cases
Issues - Get help and feedback

Contributing

MarkItDown is an open source project from Microsoft that welcomes community contributions. Interested developers can refer to the project's contribution guidelines to learn how to participate. The project accepts various forms of contributions including bug fixes, new features, and documentation improvements.