Back to feed
Dev.to
Dev.to
7/18/2026
How converting PDFs to Markdown with MarkItDown cuts LLM token costs

How converting PDFs to Markdown with MarkItDown cuts LLM token costs

Original: Your PDFs Are Eating Your LLM's Tokens for Breakfast

Short summary

PDFs waste massive token budgets when fed directly to LLMs because formatting noise gets tokenized alongside text. Microsoft's open-source MarkItDown tool converts PDFs, Office docs, images, and more into clean Markdown, cutting token usage by up to 70%. An MCP server integration lets AI clients like Cursor and VS Code auto-convert files without manual steps.

  • A single PDF page can cost 1,500–3,000 tokens before you even ask a question
  • MarkItDown converts files to Markdown, reducing token usage up to 70%
  • MCP server integration enables automatic conversion within AI coding assistants

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more