Last verified

Can Claude Code read PDFs?

Yes.
Text-layer PDFs · tested with a probe file

Yes. We generated a PDF containing the unique string AICOST PDF PROBE 4718, asked Claude Code to read the file and return that string, and it came back verbatim in 34 seconds on CLI 2.1.170. No conversion step, no plugin — just name the file in your prompt. The untested case is a scanned PDF with no text layer, where the file is really an image.

Returned our probe string exactlyAICOST PDF PROBE 4718 No setup — name the file in the prompt, that's it 34 seconds end to end, single run Scanned PDFs untested by us — no text layer is a different problem Costs tokens — a long PDF is a large input, and you pay for it
§ 01 / PROOF

We actually ran it.

Methodology →
TEST RUN · AUG 01, 2026 · CLI 2.1.170

A PDF built for the purpose, with a string nothing else could guess.

The trap with testing this is a model that answers plausibly without reading anything. So we built the file rather than downloading one: a minimal 392-byte PDF whose only content is AICOST PDF PROBE 4718 — a string that appears nowhere else and cannot be inferred from a filename.

The prompt was deliberately narrow: read probe.pdf and reply with only the probe code it contains. The answer came back as exactly that string, in 34 seconds, with no conversion tooling installed and no flags set. Reading a PDF is simply part of what the file-reading tool does.

What we did not test is a scanned document — a PDF whose pages are images of text with no text layer. That is a genuinely different job (it needs OCR, not parsing), and we won't claim a result we didn't measure. If your PDFs come from a scanner rather than a word processor, test one before relying on it.

Probe file: 392 bytes, 1 pageProbe string: AICOST PDF PROBE 4718Returned: verbatimElapsed: 34 sCLI version: 2.1.170Scanned PDF: not tested
# probe.pdf contains one line of text:
# AICOST PDF PROBE 4718
$ claude -p "Read probe.pdf and reply with ONLY
the probe code string it contains."
AICOST PDF PROBE 4718
→ 34.0 s
$
§ 02 / WHY

How it works, and what it costs.

2.1
Point at the file — there is no import step

Claude Code reads project files as it needs them, and PDFs are just another file to read. Naming one in the prompt — "summarise spec.pdf", "what does section 4 of contract.pdf say" — is the whole workflow. There's no upload, no conversion, no plugin to install.

That also means the usual permission rules apply: it reads what's in the directory you started it in, so a PDF elsewhere needs a path.

2.2
A long PDF is a large bill

Worth knowing before you point it at a 300-page specification: the text goes into the model as input tokens, and you pay for input. A short probe file is free in practice; a book-length PDF is not, particularly if you ask several questions and the document is re-sent each time.

Two mitigations. Ask for what you need in one pass rather than a conversation, and let prompt caching carry the document across follow-ups. If you're on metered credits, watch the usage counter the first time you try it on something big.

2.3
Where it will disappoint you

Two honest limits. Scanned pages — if the PDF is photographs of paper, there's no text to parse and the task becomes OCR, which we haven't tested here. Layout-heavy documents — multi-column papers, tables split across pages, and forms lose structure when flattened into text, so answers about "the third column" are less reliable than answers about the prose.

Neither is a reason not to try; both are reasons to spot-check the answer against the document rather than trusting it wholesale.

→ IF YOURS ARE SCANS

When there's no text layer.

A scanned PDF needs optical character recognition before any agent can reason about it. The pragmatic route is to OCR the file first, then hand the result over — at which point Claude Code reads it like any other text.

Frequently asked.

Quick follow-ups people search after this question.

Q · 01 Do I need a plugin or converter for PDFs? +
No. Reading a PDF is part of the built-in file-reading tool — we ran our test with nothing installed and no flags set. Name the file in your prompt and it reads it.
Q · 02 Can it read a scanned PDF? +
We didn't test that case, so we won't claim it. A scan has no text layer, which turns the job into OCR rather than parsing. Test one of your own files with a phrase you know is in it before relying on it.
Q · 03 How much does reading a big PDF cost? +
It scales with the document: the text becomes input tokens, and input is billed. On a subscription it eats your usage allowance; on metered credits it's a line on the bill. Ask everything in one pass rather than a long back-and-forth.
Q · 04 Can it edit or create PDFs? +
That's a different question from reading, and we tested only reading. It can certainly write code that generates a PDF — but treat "can it edit my PDF directly" as unverified here rather than assuming it follows.