Core Concepts
Load Entire Codebases and Books into One Claude Conversation
1M tokens, about 555,000 words in one request
Claude's context window is the amount of text it can reference at once, including its own response. On Anthropic's current models (Claude Fable 5.1, Opus 5.5, Sonnet 5.5, and Haiku 5.5) it is 1M tokens, which Anthropic puts at roughly 555,000 words. That fundamentally changes how you can work with AI. Instead of feeding Claude small snippets and hoping it understands the bigger picture, you can give it the entire picture.
A context window is not just a feature spec, it determines what kinds of tasks are possible. A 4K-token window can handle a short conversation. A 1M-token window can analyze an entire codebase, read a full book, or compare dozens of documents simultaneously. Here's what you need to know.
Anthropic's current Claude models (Fable 5.1, Opus 5.5, Sonnet 5.5, and Haiku 5.5) have a 1M-token context window, roughly 555,000 words, and can generate up to 128K output tokens per request. Some older models, such as Claude Haiku 4.5, have a 200K-token window (about 150,000 words). That means you can include entire codebases, full research papers, or 300-page documents in a single request, and Claude can reference any part of it in responses.
Fundamentals
What is a context window?
AI models don't read words, they read tokens. A token is a chunk of text, typically 3-4 characters in English. "Hello" is one token. "Anthropic" is two tokens ("Anthrop" + "ic"). Code tokenizes differently from prose, a line of Python might be 10-20 tokens depending on variable names and syntax. Anthropic puts 1M tokens at roughly 555,000 English words on its current tokenizer (older models fit about 750,000 words in 1M tokens), and 200K tokens at roughly 150,000 words.
The context window determines what Claude can "see" when generating a response. Everything inside the window, your messages, Claude's responses, uploaded documents, system prompts, is visible. Everything outside is invisible. A larger window means Claude can reason across more information simultaneously, which enables tasks that are simply impossible with smaller contexts: analyzing entire legal contracts, reviewing full codebases, or maintaining coherent long conversations.
The context window includes both what you send (input tokens) and what Claude generates (output tokens). A single request on a current model can generate up to 128K output tokens, and any thinking Claude does counts too. If your input nearly fills the window, there is little room left for the response, so leave headroom for the answer you expect.
Comparison
Context window by Claude model
| Model | Context | Approx. Words | Notes |
|---|---|---|---|
| Claude Fable 5.1 | 1M tokens | ~555,000 words | Up to 128K output tokens per request. For demanding reasoning and long-horizon agentic work. |
| Claude Opus 5.5 | 1M tokens | ~555,000 words | Up to 128K output tokens per request. For long-running agentic coding and knowledge work. |
| Claude Sonnet 5.5 | 1M tokens | ~555,000 words | Up to 128K output tokens per request. Balances speed and intelligence. |
| Claude Haiku 5.5 | 1M tokens | ~555,000 words | Up to 128K output tokens per request. For high-volume, latency-sensitive tasks. |
| Claude Haiku 4.5 (legacy) | 200K tokens | ~150,000 words | Older models such as Haiku 4.5 and the deprecated Sonnet 4.5 keep a 200K window. |
Context sizes from Anthropic's documentation as of October 2026. For every Claude release with its date, see the Claude Model Timeline.
Applications
How to use the full context window
Load an entire repository into a single conversation. Claude can read thousands of lines of code, understand the architecture, find bugs across files, suggest refactors that account for dependencies, and generate documentation that reflects the actual implementation, not just the file it can see.
Upload contracts, research papers, financial reports, or even entire books. Ask Claude to summarize, extract specific information, identify inconsistencies, or answer questions that require synthesizing information from different sections. No chunking or splitting required.
Load multiple documents simultaneously, competing proposals, different drafts of a contract, research papers on the same topic, or quarterly reports across years. Claude can compare, contrast, and identify differences that would take hours to find manually.
In a long working session, your conversation history stays in context. Claude remembers what you discussed 50 messages ago. This means you can iteratively refine work, editing a document, discussing strategy, debugging code, without Claude losing track of earlier decisions.
Best Practices
Context window best practices
Put your key documents and instructions at the beginning of the conversation. While Claude can access the full context window, attention is strongest at the beginning and end of the context. Structure your prompt so critical information appears first.
When loading multiple documents, clearly label each one with headers, XML tags, or delimiters. "Document 1: Q3 Financial Report" is much easier for Claude to reference than an unlabeled wall of text. Structure helps Claude cite and cross-reference accurately.
Just because you can fit everything in one context doesn't always mean you should. If you need to process 500 documents with the same prompt, batch processing (one document per request) is more reliable and cost-effective than cramming them all into one conversation. Use the full context for tasks that require cross-document reasoning.
Every token in the context window costs money on the API. A request carrying 200K tokens of context costs significantly more per message than a 5K-token one, because the model processes the entire context with every response. For cost-sensitive applications, only include what the model actually needs to see.
FAQ
Frequently asked questions
Not necessarily. A larger context window means Claude can see more information, but the quality of results depends on how you structure that information. A well-organized 10K-token prompt often outperforms a messy 100K-token dump. The context window is a capacity limit, not a quality dial, think of it as a desk: a bigger desk helps when you genuinely need to spread out many documents, but a tidy small desk beats a cluttered large one.
One token is roughly 3/4 of a word in English. A 1,000-word document is approximately 1,333 tokens. Code tends to tokenize less efficiently than prose, expect roughly 1 token per 3 characters for code. Anthropic provides a tokenizer tool in their documentation, and most API client libraries include a token counting utility.
The context window is everything Claude can see in a single conversation, your messages, its responses, and any documents you've shared. It resets when you start a new conversation. Memory (via Claude Projects or the API's system prompt) is persistent information that carries across conversations. Think of context as short-term working memory and projects/system prompts as long-term reference material.
On the API, you pay per token, both input and output. A conversation that fills a large share of the context window costs more per response because Claude processes the entire context each time it generates a reply. This is why context management matters: only include information the model needs for the current task. On claude.ai (consumer product), context costs are covered by your subscription.
Learn to use Claude effectively
Stop reading about it. Build something.