A complete reference for developers and enterprise teams. Every file format Claude can read and process — with size limits, quality notes, and practical guidance for building document-aware AI applications.
Claude can read and process text-based documents directly. PDFs are supported natively via the API's document processing feature. Word and PowerPoint require conversion to PDF or plain text before submission.
| Format | Extension(s) | Support | Size Limit | Notes & Tips |
|---|---|---|---|---|
| ✓ Full (API native) | 32 MB / 100 pages | Sent as base64 via document block. Claude reads text layer + images. Scanned PDFs work but text extraction quality varies. Multi-page recommended over single giant PDF. | ||
| Plain Text | .txt .md .rst | ✓ Full | Context window (200K tokens) | Most token-efficient format. Prefer plain text when accuracy of text content matters more than layout. |
| HTML | .html .htm | ✓ Full | Context window | Claude reads HTML tags. For web scraping, strip scripts and style tags before submission — they consume tokens without adding information. |
| CSV | .csv .tsv | ✓ Full | Context window (~5K–50K rows) | Best format for structured data. For large datasets, truncate to relevant rows or summarise aggregates before sending. Claude reads CSV as text — it sees columns and values. |
| XML / JSON | .xml .json .yaml | ✓ Full | Context window | Claude handles structured data well. For deep nested JSON, flatten or summarise structure before sending large files. YAML is readable but less common. |
| Word Document | .docx .doc | ⚠ Convert required (API) | N/A (convert first) | API does not accept .docx directly. Convert to PDF (preserves formatting + images) or plain text (faster processing) before API submission. Claude Cowork's file connector handles .docx natively. |
| PowerPoint | .pptx .ppt | ⚠ Convert required (API) | N/A (convert first) | Export as PDF to preserve slide layout and visuals, or extract text from each slide for content-only analysis. |
| Excel Spreadsheet | .xlsx .xls | ⚠ Convert to CSV (API) | N/A (convert first) | Export sheets as CSV. For multi-sheet workbooks, export relevant sheets individually. Claude for Excel (see product guide Claude for PowerPoint) handles .xlsx natively via the Excel plugin. |
Claude's vision capability is powered by the same models as text. Images are sent as base64-encoded data or via URL in the messages API. Up to 20 images per API request.
| Format | Extension(s) | Support | Size Limit | Notes & Tips |
|---|---|---|---|---|
| JPEG | .jpg .jpeg | ✓ Full | 5 MB per image | Most common format. Claude resizes images larger than 1568px on longest edge before processing — resize yourself first for token efficiency. Each image costs ~1,600 base tokens. |
| PNG | .png | ✓ Full | 5 MB per image | Preferred for screenshots, diagrams, and text-heavy images. Lossless compression means better OCR accuracy than JPEG for documents. |
| GIF | .gif | ✓ First frame only | 5 MB | Animated GIFs: only the first frame is processed. For multi-frame analysis, extract frames as PNGs and send individually. |
| WebP | .webp | ✓ Full | 5 MB per image | Modern format. Good compression with high quality. Useful for web screenshots. No conversion needed. |
| TIFF / BMP | .tiff .bmp | ✗ Not supported directly | N/A | Convert to PNG or JPEG before sending. LibreOffice, PIL/Pillow, or ImageMagick can handle batch conversion. |
| SVG | .svg | ✗ Not supported directly | N/A | Rasterise to PNG before sending. Claude can read the SVG XML source as text, but cannot render it visually. For diagrams, render to PNG via browser headless mode. |
Token cost of images: Each image costs a base of approximately 1,600 tokens regardless of size (after internal resizing to max 1,568px). For large-scale image processing, use the Vision API guide to understand cost implications and quality tradeoffs. Always resize images before submission when possible.
All plaintext code formats are natively supported. Claude reads source files as text — there's no special "code file" type. The key is using the appropriate file extension so context is clear.
| Language / Type | Extensions | Support | Notes |
|---|---|---|---|
| Python | .py .ipynb | ✓ Full | .ipynb (Jupyter notebooks) are JSON — Claude reads cell contents clearly. Claude Code has native Python execution environment. |
| JavaScript / TypeScript | .js .ts .jsx .tsx | ✓ Full | Include import paths and package.json context for accurate dependency analysis and refactoring suggestions. |
| All other languages | .go .rs .java .cpp .cs .rb .php .swift .kt | ✓ Full | All common programming languages supported. For large codebases, use Claude Code with its repo-aware context management rather than pasting files manually. |
| Config & Infrastructure | .yaml .toml .json .tf .hcl .dockerfile | ✓ Full | Excellent for Terraform, Kubernetes YAML, and Dockerfile analysis. Claude understands infrastructure-as-code patterns deeply. |
| SQL | .sql | ✓ Full | Include schema definition alongside queries for best analysis. Claude handles complex CTEs, window functions, and multi-join queries. |
| Compiled / Binary | .exe .dll .so | ✗ Not readable | Binary files cannot be processed as text. Use decompilation tools to extract source, or disassembly output, before passing to Claude. |
Claude supports audio transcription and analysis via the API's audio processing feature. Audio is transcribed internally before Claude processes it — you're billed for both the audio transcription and the resulting text tokens.
| Format | Extension(s) | Support | Duration Limit | Notes |
|---|---|---|---|---|
| MP3 | .mp3 | ✓ Full | Up to 25 MB / ~1hr | Most common audio format. Claude transcribes and can summarise, extract action items, or analyse sentiment from meeting recordings. |
| WAV / FLAC | .wav .flac | ✓ Full | 25 MB | Lossless formats produce better transcription for low-quality or accented speech. File sizes are larger — compress to MP3 for routine use. |
| M4A / AAC | .m4a .aac | ✓ Full | 25 MB | Apple/iPhone recordings default to M4A. Claude handles these natively — no conversion needed for mobile recordings. |
| OGG / WebM audio | .ogg .webm | ✓ Full | 25 MB | Common in web browser recordings and VoIP exports. Both formats supported without conversion. |
How to build file-handling pipelines that are fast, reliable, and cost-efficient at scale.
Always extract text from PDFs server-side before sending to Claude when layout doesn't matter. A 50-page PDF parsed to plain text costs 80% fewer input tokens than the raw PDF. For document processing at scale, the cost difference is significant. See our document processing guide.
Claude internally resizes images to a maximum of 1,568px on the longest edge. If you send a 4K image, you pay for the processing overhead of the resize before analysis begins. Pre-resize to 1,024px–1,500px on your side — same quality, 30–60% lower token cost per image.
Enterprise document workflows involve dozens of formats: DOCX, XLSX, PPTX, Visio, CAD files, email (.msg, .eml). Build or use a conversion service (LibreOffice headless, Pandoc, or AWS Textract) as a preprocessing layer. Output to PDF or plain text, then pass to Claude. Never send unsupported formats directly — they'll error silently or return garbage.
For bulk document processing (contract review, report analysis, data extraction), use the Batch API with one document per request. Don't concatenate multiple documents into one large API call — you lose the ability to track per-document results and errors, and you can't parallelise processing.
When sending documents, prepend metadata: document type, date, source, and the specific question you want answered. "Here is a vendor contract from 2024. Extract: payment terms, renewal clauses, and limitation of liability cap." This structured context consistently produces better results than just sending the document alone.
Claude handles CSV, JSON, and XML differently from prose. For structured data files, instruct Claude explicitly: "The following is a CSV with columns: name, date, value. Analyse the trend in the value column by month." Don't assume Claude will infer format and intent — make it explicit in your system prompt or user message.
Claude Cowork has different file handling than the API. Through its folder connector, Cowork can read files directly from connected cloud storage — Google Drive, OneDrive, SharePoint, Box, Dropbox — without any manual upload step. It handles DOCX, XLSX, and PPTX natively at the connector level, converting them internally before Claude reads them.
Cowork users should not worry about format conversion — the product handles it. But developers building document processing pipelines via the API need to handle conversion themselves, either using pre-built services or client-side libraries.
Claude Code has a fundamentally different approach to files than the API. Rather than sending files in API payloads, Claude Code reads files directly from your local filesystem. It has native tools to read, write, create, and delete files — and it manages context intelligently, reading only the portions of large files relevant to the current task.
For developers working with large codebases (10K+ files), never try to paste files into claude.ai chat manually. Use Claude Code instead — it's built for repository-scale file access. The MCP filesystem server provides similar capabilities for API-based applications that need dynamic file access. See our MCP servers guide.
Coming soon: Anthropic has signalled support for additional file types in upcoming API versions, including native DOCX support and video file processing beyond still frames. Check the Claude product updates tracker for the latest additions.
We've built document processing systems handling thousands of files per day. Our API Integration team will design your file handling architecture, pre-processing pipeline, and Claude integration for maximum accuracy and cost efficiency.