TL;DR

  • To convert a PDF to Markdown for Claude, install MarkItDown (pip install markitdown) and run markitdown 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.

File type Converts to Markdown? Notes
PDF (text) Yes Cleanest result, headings and tables preserved
Word / PowerPoint Yes .docx and .pptx handled directly
Excel / CSV Yes Rows become Markdown tables
Scanned PDF / images Partly Relies on OCR, quality varies
Audio / YouTube URL Yes Transcribes to text before conversion

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:

1Install it (one line)

You need Python, then: pip install markitdown. No API key, no config.
2Convert your file

markitdown report.pdf > report.md, same shape for every file type.
3Give Claude the Markdown

Open 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

# PDF
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

  1. Feeding Claude the raw file anyway. Converting then uploading the original defeats the point. Give it the .md.
  2. Expecting magic on scanned PDFs. A scan is an image; MarkItDown leans on OCR, so quality varies.
  3. 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.
  4. Pasting a whole 300-page document. Clean isn’t small. Trim to the section you need first.
  5. Skipping a quick eyeball. Open the .md for two seconds. If a table came out mangled, you want to know before Claude answers off it.

Your checklist

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)

Yes. Markdown keeps the structure that matters, headings, lists, tables, while dropping the layout noise of a raw file. Microsoft’s docs note Markdown conventions are highly token-efficient, so the same content costs fewer tokens than a raw PDF.

Yes. MarkItDown is open-source, MIT-licensed, and built by Microsoft. No account and no API key. One command to install.

PDF, Word, Excel, PowerPoint, images (with OCR), audio (with transcription), HTML, CSV/JSON/XML, ZIP archives, EPubs, and YouTube URLs.

Install with 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.

Only partly. A scanned page is an image, so MarkItDown relies on OCR and quality varies. Text-based PDFs convert cleanly.

No. Clean is not the same as small, trim the Markdown to the section you need before prompting. Fewer tokens means less of your usage limit or API spend.

Source: Microsoft, MarkItDown (GitHub).

Free · 10 Minutes

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.

Take the Free Scorecard →

Get in touch

Prefer to talk it through? Call or text, email, or send a message.

Ty Pryor

Ty Pryor
Small business marketing & AI. I share the Claude and AI workflows I actually run, no hype, no fluff.