Skip to content
FossShelf
Home / Categories / For AI Engineers

MarkItDown

Convert PDFs, Office files, and images to Markdown, free

Replaces Unstructured Io, Google Document Ai, Amazon Textract

195.79K starsMITreviewed 20 Apr 2026last commit 7 Nov 2026
Screenshot of MarkItDown

Who it's for

AI engineers building RAG ingestion

MarkItDown converts common document formats into Markdown before chunking and embedding.

your source data already arrives as clean Markdown or JSON.

Data teams normalizing office documents

the CLI can batch convert Word, Excel, PowerPoint, and PDF files.

you need exact visual layout preservation.

Developers adding document upload to an AI app

the Python API fits backend conversion steps.

users upload untrusted files and you cannot sandbox conversion.

The problem

LLM pipelines break when source documents arrive as PDFs, slide decks, spreadsheets, images, audio files, or mixed archives. Raw extraction often loses headings, tables, links, and other structure that helps models understand the content. Teams usually patch this with one parser per file type, then spend time normalizing output before indexing or analysis. That slows down ingestion work and creates security concerns when untrusted files run through broad conversion code with too many permissions.

How it works

Broad file conversion

Converts PDF, PowerPoint, Word, Excel, images, audio, HTML, CSV, JSON, XML, ZIP archives, YouTube URLs, and EPUBs into Markdown.

CLI pipeline support

CLI usage supports shell pipelines, such as converting a PDF and redirecting Markdown output to a file.

Python API

Python API exposes MarkItDown conversion inside ingestion jobs, evaluation scripts, and document-processing services.

LLM-ready Markdown output

Markdown output preserves useful structure such as headings, lists, tables, and links for LLM and search workflows.

Optional PyPI extras

PyPI package supports optional extras through `markitdown[all]` for broad file-format coverage.

Features

  • Broad file conversion
  • CLI pipeline support
  • Python API
  • LLM-ready Markdown output
  • Optional PyPI extras

How to install

pip install markitdown[all] markitdown path-to-file.pdf > document.md from markitdown import MarkItDown md = MarkItDown() result = md.convert("test.xlsx") print(result.text_content)

Recommended for this setup

Strengths

  • Built for LLM ingestion: MarkItDown focuses on LLM-ready Markdown rather than pixel-perfect document reproduction, which matches RAG and text analysis needs.
  • Messy input coverage: The supported format list covers the messy inputs teams actually receive, including Office files, images, audio, archives, and web formats.
  • MIT license: The MIT license makes it practical to embed in internal ingestion systems and commercial AI products.
  • CLI and API workflows: The CLI and Python API support both quick local conversions and repeatable batch pipelines.

Trade-offs

  • Not for pixel-perfect conversion: MarkItDown is not meant for high-fidelity human-facing document conversion, so layout-heavy PDFs or slide decks may need a different tool.
  • Untrusted inputs need sandboxing: The project warns that conversion runs with the privileges of the current process, so untrusted inputs require sandboxing and narrow conversion functions.
  • Optional dependencies required: OCR, audio transcription, and optional format support depend on installed extras and external dependencies.

Tech stack

Languages
Python, Dockerfile
Frameworks
LangChain
Databases
—
Tooling
—

FAQ

What file types does MarkItDown support?

MarkItDown supports PDFs, Word, PowerPoint, Excel, images with OCR metadata, audio with transcription metadata, HTML, CSV, JSON, XML, ZIP files, YouTube URLs, EPUBs, and more. Exact support depends on installed extras and optional dependencies.

Is MarkItDown good for human-readable document conversion?

Not as the primary goal. MarkItDown optimizes for Markdown that works well in LLM and text analysis pipelines, not perfect visual reproduction for people.

Is MarkItDown safe for untrusted files?

Use caution. The project states that MarkItDown performs I/O with the privileges of the current process, so untrusted inputs should run in a restricted environment with narrow conversion functions.

Similar tools

More in AI Engineers