Claude OCR means using Claude to read a document instead of a dedicated OCR engine. Claude accepts PDFs up to 32 MB and 100 pages and reads each page with vision, so it handles scans too and can return named fields from a prompt. Here is the code, the real limits, and where a purpose-built OCR API pulls ahead.
The gap a raw Claude call leaves: no per-value confidence score, a hard 100-page ceiling, and token cost that climbs with length. DocuOCR fills all three. Try the extractor below. Last updated July 2026.
Upload a document to extract
Drop files here or click to upload
Up to 50 files
Uploading...
Extract fields with confidence scores, no 100-page limit, right in the browser.
Yes, you can use Claude for OCR. Claude reads PDFs and images through its vision capability, so it recognizes the text on a page and can also extract named fields, answer questions, and follow a prompt, which a plain OCR engine cannot do. It is not a separate OCR step running in the background: Claude treats each page as both an image and a text layer and reasons over both, so a scanned PDF with no embedded text works the same as a digital one. The practical limits are real, though. A PDF can be up to 32 MB and 100 pages, and that 100-page ceiling is a hard model limit, not something a bigger plan raises. Cost is by tokens, roughly 1,500 to 3,000 per page, so a long document runs well above a dedicated OCR engine. And Claude does not return a reliable per-value confidence score, so for anything touching money you still need to score confidence and review the values it was unsure of.
Send a PDF as a base64 document block and ask Claude to return the fields you want as JSON. This is Python with the anthropic SDK.
import anthropic, base64
client = anthropic.Anthropic() # reads ANTHROPIC_API_KEY
with open("invoice.pdf", "rb") as f:
pdf = base64.standard_b64encode(f.read()).decode()
msg = client.messages.create(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": [
{"type": "document",
"source": {"type": "base64",
"media_type": "application/pdf",
"data": pdf}},
{"type": "text",
"text": "Extract the invoice number, date and total as JSON."},
]}],
)
print(msg.content[0].text)
That works for one document under 100 pages. For production you add the parts Claude does not give you: split anything over 100 pages, retry on rate limits, batch across many files, and, most important, validate every value because the reply carries no confidence score. The document OCR API returns those fields with a confidence score already attached, and the PDF to JSON API guide shows the same job as three plain HTTP calls.
What Claude accepts, how it reads, and where the ceilings sit. From the Claude platform docs, verified July 2026.
| Property | Claude |
|---|---|
| Max PDF size | 32 MB per document |
| Max PDF pages | 100 pages (model-level hard limit) |
| How it reads | Vision: each page as image and text layer |
| Reads scans | Yes, no text layer needed |
| Tokens per page | About 1,500 to 3,000, by density |
| Confidence score per value | No reliable native score |
| Image formats | PNG, JPEG, GIF, WebP |
| Office files (DOCX, XLSX) | Not native, convert to PDF first |
The two limits that bite in production are the 100-page cap and the missing confidence score. A 300-page loan file has to be split and stitched back together, and without a per-value score you cannot tell a value Claude read cleanly from one it guessed. For a broader view of how Claude stacks up against GPT-4o, Gemini and Mistral, see LLM OCR vs traditional OCR.
Auto-accept high-confidence fields and review the rest. A raw Claude call cannot tell you which values it was unsure of.
No page cap to work around, no splitting and stitching a long file back together by hand.
Batch thousands of documents on a per-page rate instead of paying token cost that climbs with every field.
Structured table rows with cells in order, not a prose description you have to re-parse.
A stored result with confidence and positions, so a reviewer can see why a value was accepted or flagged.
Three HTTP calls that return JSON, no prompt engineering to keep the output shape stable.
Accuracy, hallucination and cost across GPT-4o, Claude, Gemini and OCR.
The endpoint reference and structured JSON response shape.
Turn any PDF into structured JSON with named fields.
An honest roundup of OCR APIs for US teams.
The real per-1,000-page cost of reading documents with Gemini.
Extract text and data from any image with one API.
Post a document and read the JSON back from Python.
Turn documents into structured, confidence-scored data.
Per-1,000-page rates across the market.
DocuOCR reads native and scanned documents past the 100-page limit, returns named fields and tables as JSON, and scores confidence on every value so a wrong read is flagged before you trust it. Generate an API key and test it on your own documents, free, before you pay per page.