Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

markitdown

> AI 编程
Open source

Python tool for converting files and office documents to Markdown.

170.6K stars0 likes6 views
WebsiteGitHub

About

Python tool for converting files and office documents to Markdown.

MarkItDown

[!IMPORTANT] MarkItDown performs I/O with the privileges of the current process. Like open() or requests.get(), it will access resources that the process itself can access. Sanitize your inputs in untrusted environments, and call the narrowest convert_* function needed for your use case (e.g., convert_stream(), or convert_local()). See the Security Considerations section of the documentation for more information.

MarkItDown is a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines. To this end, it is most comparable to textract, but with a focus on preserving important document structure and content as Markdown (including: headings, lists, tables, links, etc.) While the output is often reasonably presentable and human-friendly, it is meant to be consumed by text analysis tools -- and may not be the best option for high-fidelity document conversions for human consumption.

MarkItDown currently supports the conversion from:

  • PDF
  • PowerPoint
  • Word
  • Excel
  • Images (EXIF metadata and OCR)
  • Audio (EXIF metadata and speech transcription)
  • HTML
  • Text-based formats (CSV, JSON, XML)
  • ZIP files (iterates over contents)
  • YouTube URLs
  • EPubs
  • ... and more! Why Markdown?

Markdown is extremely close to plain text, with minimal markup or formatting, but still provides a way to represent important document structure. Mainstream LLMs, such as OpenAI's GPT-4o, natively "speak" Markdown, and often incorporate Markdown into their responses unprompted. This suggests that they have been trained on vast amounts of Markdown-formatted text, and understand it well. As a side benefit, Markdown conventions are also highly token-efficient. Prerequisites MarkItDown requires Python 3.10 or higher. It is recommended to use a virtual environment to avoid dependency conflicts.

With the standard Python installation, you can create and activate a virtual environment using the following commands:

If using uv, you can create a virtual environment with:

If you are using Anaconda, you can create a virtual environment with: Installation

To install MarkItDown, use pip: pip install 'markitdown[all]'. Alternatively, you can install it from the source: Usage Command-Line

Or use -o to specify the output file:

You can also pipe content: Optional Dependencies MarkItDown has optional dependencies for activating various file formats. Earlier in this document, we installed all optional dependencies with the [all] option. However, you can also install them individually for more control. For example:

will install only the dependencies for PDF, DOCX, and PPTX files.

At the moment, the following optional dependencies are available:

  • [all] Installs all optional dependencies
  • [pptx] Installs dependencies for PowerPoint files
  • [docx] Installs dependencies for Word files
  • [xlsx] Installs dependencies for Excel files
  • [xls] Installs dependencies for older Excel files
  • [pdf] Installs dependencies for PDF files
  • [outlook] Installs dependencies for Outlook messages
  • [az-doc-intel] Installs dependencies for Azure Document Intelligence
  • [az-content-understanding] Installs dependencies for Azure Content Understanding
  • [audio-transcription] Installs dependencies for audio transcription of wav and mp3 files
  • [youtube-transcription] Installs dependencies for fetching YouTube video transcription Plugins

MarkItDown also supports 3rd-party plugins. Plugins are disabled by default. To list installed plugins:

To enable plugins use:

To find available plugins, search GitHub for the hashtag #markitdown-plugin. To develop a plugin, see packages/markitdown-sample-plugin. markitdown-ocr Plugin

The markitdown-ocr plugin adds OCR support to PDF, DOCX, PPTX, and XLSX converters, extracting text from embedded images using LLM Vision — the same llm_client / llm_model pattern that MarkItDown already uses for image descriptions. No new ML libraries or binary dependencies required.

Installation:

Usage:

Pass the same llm_client and llm_model you would use for image descriptions:

If no llm_client is provided the plugin still loads, but OCR is silently skipped and the standard built-in converter is used instead.

See packages/markitdown-ocr/README.md for detailed documentation. Azure Content Understanding

Azure Content Understanding provides higher-quality conversion with structured field extraction (YAML front matter)

Issues· 641 open

View all issuesOpen on GitHub
  • #2581

    VS Code MCP gallery still installs 0.0.1a4 despite initialization fix in 0.0.1a7

    Updated Oct 2, 2026
  • #2580

    PDF: one form-like page makes the rest of the document interleave two-column text

    Updated Oct 2, 2026
  • #2573

    DOCX math: a delimiter with several arguments keeps only the last one

    Updated Oct 1, 2026
  • #2571

    PPTX: same-row shapes are read top-first instead of left-to-right

    Updated Oct 1, 2026
  • #2569

    PPTX: one unrecognized shape type aborts the whole presentation

    Updated Oct 1, 2026
  • #2565

    markitdown-ocr: columns are glued together on PDF pages that contain an embedded image

    Updated Sep 29, 2026
  • #2561

    1era Fase Practica

    Updated Sep 28, 2026
  • #2560

    PDF bottom-to-top table headers are reversed in agstat.pdf (0.1.8)

    Updated Sep 28, 2026
  • #2474

    Bug: Extensionless log streams can be rendered as CSV tables

    Updated Sep 25, 2026
  • #244

    Docx - Add an Option to ignore Header and Footer

    Updated Sep 22, 2026

> Tags

Pythonautogenautogen-extensionlangchainmarkdown

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
CategoryAI 编程
PricingOpen source

> Related tools

G
GitHub Copilot
GitHub 官方 AI 编程助手,覆盖补全、Chat 与 Agent 模式。
C
Cursor
AI 原生代码编辑器,对话改代码、多文件 Agent 与规则体系是其核心。
S
skills
Skills for Real Engineers. Straight from my .agents directory.