- To convert a PDF to Markdown for Claude, install MarkItDown (
pip install markitdown) and runmarkitdown file.pdf > file.md. - MarkItDown is a free, MIT-licensed Microsoft tool. No account, no API key.
- Markdown keeps headings, lists and tables as plain text, so a PDF costs fewer tokens. You lose any charts or images, so keep the PDF for visual documents.
- It converts PDF, Word, Excel, PowerPoint, images (OCR), audio, HTML and more. Trim to the section you need before prompting.
The real barrier isn’t Claude. It’s the input.
Most people upload a PDF straight into Claude, get a mediocre answer, and quietly decide the tool is overhyped. The problem was never Claude. It’s the file. A messy PDF makes Claude do two jobs: untangle the formatting and answer your question. You’re paying tokens for the first one, and getting a noisier answer for it.
The fix is to strip the file down to clean, structured text before Claude ever sees it. Do that by hand and it’s tedious. There’s a free tool that does it in one line.
What MarkItDown actually is
MarkItDown is, in Microsoft’s own words, “a lightweight Python utility for converting various files to Markdown for use with LLMs and related text analysis pipelines.” It’s open-source, MIT-licensed, and built by Microsoft, free, no account.
It converts the formats you actually use: PDF, Word, Excel, PowerPoint, images (with OCR), audio, HTML, CSV/JSON/XML, ZIP archives, EPubs, and even YouTube URLs.
Why Markdown, not plain text
Because it keeps the structure. Microsoft’s own docs put it this way: “Mainstream LLMs natively ‘speak’ Markdown… As a side benefit, Markdown conventions are also highly token-efficient.” Markdown keeps the structure (headings, lists, tables) that tells Claude what matters, while dropping the layout noise that doesn’t. Cleaner meaning, fewer tokens, sharper answer.
How to convert a PDF to Markdown for Claude
To convert a PDF to Markdown for Claude, install MarkItDown, run one command, then hand Claude the .md file instead of the original, three steps:
pip install markitdown. No API key, no config.markitdown report.pdf > report.md, same shape for every file type.report.md, copy the text and paste it into Claude, or save it as a .txt file and upload that. It uses less of your usage limit than the PDF.Steal these, every file type
markitdown contract.pdf > contract.md
# Word
markitdown brief.docx > brief.md
# Excel / spreadsheets
markitdown numbers.xlsx > numbers.md
# PowerPoint
markitdown deck.pptx > deck.md
# A YouTube video (pulls the transcript)
markitdown “https://www.youtube.com/watch?v=VIDEO_ID” > video.md
The mistakes that waste the effort
- Feeding Claude the raw file anyway. Converting then uploading the original defeats the point. Give it the
.md. - Expecting magic on scanned PDFs. A scan is an image; MarkItDown leans on OCR, so quality varies.
- Converting a PDF that is mostly charts or photos. Claude reads images and charts in PDFs of 100 pages or fewer, so for those, upload the PDF itself.
- Pasting a whole 300-page document. Clean isn’t small. Trim to the section you need first.
- Skipping a quick eyeball. Open the
.mdfor two seconds. If a table came out mangled, you want to know before Claude answers off it.
Your checklist
- Python installed
pip install markitdown- Convert:
markitdown FILE > FILE.md - Open the
.mdand sanity-check tables/headings - Trim to the relevant section
- Paste the Markdown into Claude (or upload it as .txt), not the original
The honest summary
MarkItDown won’t make Claude smarter, it makes your input cleaner, which is most of the battle most people never fight. It won’t perfectly format every weird PDF, and scanned pages still depend on OCR. But for the everyday case, reports, briefs, spreadsheets, slides, converting to Markdown first means fewer tokens and better answers, for zero cost and two minutes of setup. Claude is only as good as what you feed it. Clean the input, and the output cleans up with it.
Straight answers (FAQ)
pip install markitdown, then run markitdown yourfile.pdf > yourfile.md. Paste the Markdown into Claude, or save it as .txt and upload that, instead of the original.Source: Microsoft, MarkItDown (GitHub).
Find out where your marketing is leaking.
The free scorecard checks your traffic, website, lead capture, email and strategy, and tells you exactly what to fix first.
Get in touch
Prefer to talk it through? Call or text, email, or send a message.