עברית 📰 Blog
← Back to Blog
AI Tools

MarkItDown: Turn PDFs and Office Files Into Markdown Before Sending Them to Claude

Stav Adam
Founder, Masterphub
October 19, 2026

Share this article

MarkItDown: Turn PDFs and Office Files Into Markdown Before Sending Them to Claude

When you send a PDF to Claude through the API, Anthropic's docs explain that each page is converted into an image, and the page text is extracted and sent alongside it. Text alone typically costs 1,500 to 3,000 tokens per page, and the image is billed on top using the normal image rules. For a text-heavy document, that image part often adds little. MarkItDown is a simple way to skip it.

What it is

MarkItDown is an open-source Python tool from Microsoft, under the MIT license, that converts files into Markdown for use with language models. It keeps structure such as headings, lists, tables and links. The repo has passed 190,000 stars on GitHub.

What it can do

  • Convert PDF, Word, PowerPoint and Excel files.
  • Handle HTML, CSV, JSON, XML, ZIP archives, EPUB files and YouTube URLs.
  • Pull metadata and OCR text from images, and transcribe speech from audio files.
  • Work as a command-line tool or as a Python library. The same repo also includes a markitdown-mcp package for connecting it to MCP-capable agents.

How to try it

  • Make sure you have Python 3.10 or newer.
  • Install it with pip install 'markitdown[all]', or pick only the formats you need, for example markitdown[pdf, docx].
  • Convert a file: markitdown report.pdf -o report.md.
  • Open the Markdown file, check that tables and headings came through, then give that file to Claude instead of the original.
  • In Claude Code, you can add a line to your project's CLAUDE.md asking it to convert documents with MarkItDown before reading them.

Limits and caveats

  • You lose the visuals. Charts, diagrams, scanned pages without a text layer, and forms where position matters are better sent as the original PDF, because Claude reads them from the page images.
  • Microsoft notes the output is meant for machines, not for high-fidelity documents for human readers.
  • MarkItDown runs with the permissions of your user account. Be careful when converting files from unknown sources.
  • The optional Azure Document Intelligence integration is billed per call.
  • Savings depend on the document. Use Anthropic's token counting to compare the PDF and the Markdown version on your own files.

Who it is for

Anyone who feeds Claude contracts, reports, articles or spreadsheets on a regular basis, and developers building pipelines that move many documents into a model. If you hit context limits or token caps often, this is a five-minute install worth testing.

Find ready prompts for working with documents at masterphub.io.

Sources: microsoft/markitdown on GitHub; Anthropic docs: PDF support.

Share this article