How to Extract Data from Scanned Documents with Claude
What Is the Fastest Way to Extract Data from a Scanned Document with Claude?
Attach your scanned document image to a Claude conversation, type a clear instruction that names every field you want and the format you want it in, and send. Claude processes the image and your text simultaneously, returning structured output — a list, a table, or JSON — without you ever retyping a single line. This works on every current Claude plan, including Free, Pro, Max, Team, Enterprise, and the API, because vision capability is built into all current Claude 3 and 4 models.
The practice is called multimodal prompting: combining a visual input (your scan) with a text instruction in one prompt. Claude reasons across both at the same time, so it can read imperfect scans, extract specific fields, and format the result exactly as you specify.
How Do You Extract Data from a Scanned Document on Claude.ai (No Code)?
If you have no technical background, the claude.ai web interface is the easiest starting point. Here is the exact flow:
- Open claude.ai in a browser or the desktop app and start a new conversation.
- Click the image attachment button (paperclip or image icon) at the bottom of the message composer, or drag and drop your scanned file directly into the chat window.
- Type a precise instruction alongside the image — for example: "Please read this invoice and extract the vendor name, invoice number, each line item with its price, and the total due. Return the result as a bullet list."
- Send the message and review the extracted data. If a field is missing or formatted differently than you need, follow up in the same conversation.
A concrete example from the source material: a small business owner uploads a receipt photo and asks Claude to list the vendor name, date, each line item with its price, and the total amount. Claude returns a clean, readable breakdown — eliminating manual transcription even when lighting or angle is imperfect.
How Do You Extract Data from Scanned Documents via the Claude API?
For teams processing documents at scale, the API gives you three ways to send images. Choose based on where your files live:
- URL method: If your scan is already hosted at a publicly accessible address, reference it directly in your request. This is the simplest option with no encoding overhead.
- Base64 method: If your file is local or behind authentication, read the file, base64-encode it, and embed it in the request body alongside the media type. Use this when you cannot expose the file via a public URL.
- Files API method (beta): Upload the file once to receive a reusable identifier, then reference that identifier in subsequent requests. This avoids re-transmitting large payloads on every call and is ideal when the same document or template is referenced repeatedly. The Files API requires a specific beta header in each request.
Regardless of method, the recommended structure is to place the image content block before the text instruction in your request payload. Claude performs best when it sees the image first, then the instruction.
A practical API example for invoice extraction: construct a request using a model such as claude-sonnet-4-5-20250929, include an image block pointing to your scanned invoice, then follow it with a text block like: "Extract vendor name, invoice number, line items, totals, and due date. Return as JSON." The response arrives as structured JSON ready to insert into a database, eliminating manual data entry entirely.
What Makes a Good Prompt for Document Data Extraction?
The single biggest variable you control — after image quality — is how precisely you write your text instruction. Vague prompts produce generic output. Specific prompts produce usable data. Follow these principles:
- Name every field explicitly. Instead of "get the details," write "extract vendor name, invoice number, line items with unit price and quantity, subtotal, tax, and total due."
- Specify the output format. Tell Claude whether you want JSON, a bullet list, a markdown table, or plain prose. If you need JSON, say so and optionally sketch the key names.
- Add any constraints. If a field might be absent, say "return null if not found." If currency should be normalized, say so.
- Use follow-up turns. Claude supports multi-turn visual conversations, so if the first response misses a field or formats something incorrectly, ask for a correction in the same thread without re-uploading the image.
What Image Quality Do You Need for Reliable Extraction?
Image quality directly affects accuracy. Heavy compression introduces artifacts that make text and fine details harder to read. For document analysis and OCR tasks, the source material recommends using PNG or high-quality JPEG, and ensuring images are at least 200 pixels on the short edge — below this threshold the risk of misreads increases.
If your scans are already in a lossy format, try to use the highest quality version available before sending. For documents where every character matters — invoices, legal forms, lab results — PNG is the safer choice.
When Should You Use Claude for Document Extraction vs. a Dedicated OCR Tool?
Claude's multimodal prompting is best for open-ended extraction, reasoning, and flexible output formatting — situations where you need to interpret context, handle varied document layouts, or combine extraction with analysis. The finance team use case in the source material illustrates this well: uploading hundreds of scanned invoices and asking Claude to extract structured fields into JSON, eliminating manual data entry across varied vendor formats.
Dedicated OCR or computer vision APIs are better when you need guaranteed structured field extraction at very high throughput, bounding-box coordinates for detected text, or a certified extraction pipeline for compliance purposes. Those tools are narrower but faster and more predictable for pure, high-volume extraction at scale.
| Scenario | Best Tool | Why |
|---|---|---|
| Varied document layouts, flexible fields, reasoning needed | Claude multimodal prompting | Handles context, ambiguity, and mixed formats; output can be prose, JSON, or code |
| High-volume, uniform forms with strict SLAs | Dedicated OCR API (e.g., Textract, Cloud Vision) | Faster, more predictable, supports bounding boxes and certified pipelines |
| Extraction + analysis in one step (e.g., summarize + extract) | Claude multimodal prompting | Combines vision and language reasoning in a single call |
| Same reference image used across many API calls | Claude Files API (beta) | Upload once, reference by ID — avoids re-transmitting large payloads |
What Are the Most Common Mistakes When Extracting Data from Scans?
Avoid these pitfalls to get reliable results from the start:
- Vague instructions: Asking "what's on this document?" produces a description, not structured data. Always name the fields and format you need.
- Low-resolution or heavily compressed images: Artifacts from aggressive JPEG compression cause misreads. Use PNG or high-quality JPEG for document work.
- Text before image in API requests: Place the image content block before the text instruction in your API payload for best results.
- Expecting facial recognition: Claude will not identify individuals by appearance. If a person's identity is relevant context, supply it in your text prompt.
- Ignoring token costs for large batches: High-resolution images consume more tokens. If your task does not require fine detail, downsample images before sending to control costs without sacrificing accuracy.
Is Claude's Document Extraction Worth Using on Free and Pro Plans?
Yes — vision capability is available across all plans, including Free. You can start extracting data from scanned receipts, invoices, forms, and other documents immediately on claude.ai without any setup or API key. The interface supports drag-and-drop image upload, and the same multimodal prompting techniques apply whether you are on Free or Enterprise.
For teams processing documents programmatically, the API unlocks automation: batch processing, JSON output piped directly into databases, and the Files API for reusing reference documents. The Anthropic vision documentation covers the full technical details for each image input method.
The bottom line: if your data is trapped in scanned images and converting it manually is costing time, Claude's multimodal prompting is a practical, accessible solution — no specialized OCR setup required, and no coding needed to get started.
Frequently asked questions
Can Claude read handwritten text on scanned documents?
Claude can attempt to read handwritten text, but accuracy depends heavily on legibility and image quality. For printed text on clean scans, results are generally reliable. For handwriting, use high-resolution images and specify in your prompt that the document contains handwritten content.
What image formats does Claude accept for document extraction?
Claude accepts common image formats including JPEG and PNG. For document and OCR tasks, PNG or high-quality JPEG is recommended to avoid compression artifacts that can cause misreads.
How many scanned pages can I send in one API request?
The API supports sending multiple images in a single request. For requests using the large context window, the combined media limit is 600 images or PDF pages per request, according to Anthropic's documentation.
Do I need to code to extract data from scanned documents with Claude?
No. The claude.ai web interface lets you drag and drop an image and type your instruction — no coding required. The API is available for teams who want to automate extraction at scale.
Can I ask Claude to extract data from multiple scanned documents at once?
Yes, you can include multiple images in a single API request or attach multiple images in the claude.ai interface. Specify clearly in your prompt which fields to extract from each document, or ask Claude to process them as a batch.
Is the Files API the best way to handle repeated document extraction?
If you are referencing the same document or template across many API calls, the Files API (currently in beta) lets you upload once and reuse a file identifier, avoiding repeated large payload transfers. For one-off extractions, the URL or base64 methods are simpler.
Multimodal prompting is one of 85 features in Claude Master — the independent, continuously updated manual with worked examples, the pitfalls, and the workflows that put Claude to work.
Get Claude Master — founding price →Independent product. Not affiliated with or endorsed by Anthropic. "Claude" is a trademark of Anthropic, used here only to describe the subject of this guide.