Claude Files
Use MarkItDown To Reduce Claude File Tokens
Sick of hitting your Claude limits? Before you upload another heavy PDF, convert it into clean Markdown so Claude can focus on the content instead of the formatting noise.
Back to resourcesEvery time you upload a PDF, Claude has to process more than just the words.
It can also take in formatting, broken tables, layout artifacts, images and extra document structure that you may not actually need.
That is how a simple file can burn more context than expected before you have even asked your question.
The Problem
Claude is good at reading files, but raw documents are not always efficient.
PDFs, slides and spreadsheets often contain layout information that is useful for humans but wasteful for language models.
If you are working with a lot of source material, that waste adds up quickly.
The Tool
MarkItDown is a free Microsoft tool on GitHub that converts files and office documents into Markdown.
Search GitHub for microsoft markitdown or go directly to the Microsoft MarkItDown repository.
The repo is public, official and widely used, with well over 100,000 GitHub stars.
What It Converts
MarkItDown can convert common work files into cleaner Markdown text, including:
- PDFs
- PowerPoints
- Word documents
- Excel files
- images with OCR or metadata
- audio files with transcription support
- HTML
- CSV, JSON and XML
- ZIP files
- YouTube URLs
- EPubs
How To Use It Yourself
If you are comfortable with the command line, install it with:
pip install 'markitdown[all]'
Then convert a file like this:
markitdown path-to-file.pdf -o document.md
Upload the Markdown file to Claude instead of the original PDF when you only need the content, structure and text.
Markdown is close to plain text, but still keeps useful structure like headings, lists, links and tables. That makes it easier for language models to read efficiently.
Connect It To Claude Desktop
MarkItDown also has an MCP server called markitdown-mcp.
That means advanced users can connect it to Claude Desktop so Claude can call a tool that converts files to Markdown.
Install the MCP package with:
pip install markitdown-mcp
Then run it with:
markitdown-mcp
The MarkItDown documentation recommends Docker for Claude Desktop setup. If you use the MCP route, follow the repository's Claude Desktop instructions carefully and only give it access to folders you trust.
Important Note
This is not magic compression. The token savings depend on the file.
A messy PDF with heavy formatting, tables and images may shrink dramatically when converted to Markdown. A simple text-heavy document may not change much.
The practical test is simple: convert the file, compare the Markdown output with the original, and upload the version that gives Claude the cleanest useful context.
Final Thought
You are not trying to remove information Claude needs.
You are cutting the waste before it hits the context window.