Context Window Checker

Check whether your prompt fits the context window of current GPT, Claude and Gemini models. Paste text, add the expected output, and see the share of each context window used.

Use this when you already know the count, for example from an API usage field.

Include room for reasoning tokens. Input and output share the context window.

OpenAI tokens0
Claude (est.)0
Gemini (est.)0
Characters0

ModelContextInput + outputUsedStatus

OpenAI counts use the o200k_base tokenizer in your browser. Claude and Gemini counts are estimates from the providers’ published characters-per-token ratios, so leave a safety margin. Context sizes checked: November 2026.

FitsTightToo long EstimateYour count

Will Your Prompt Fit the Context Window?

Every model has a context window: the maximum number of tokens it can handle in one request, counting your input and the answer together. Send too much and the API rejects the request, or your own code has to cut documents and chat history. This context window checker shows how much room a prompt leaves on each current model.

Paste a prompt, a long document or a whole conversation and enter how long you expect the answer to be. A bar per model shows the share of the window used, and a label tells you whether it fits, is tight or is too long. OpenAI counts are exact o200k_base counts computed in your browser; Claude and Gemini counts are clearly marked estimates.

A prompt compared with a model context window180K tokens18% of 1MContextWindow

How to check a prompt against the context window

  1. Paste everything you send: system prompt, tool definitions, retrieved documents, conversation history and the new message. Or type a known token count into the input tokens field.
  2. Enter the expected output, including reasoning tokens if you use a reasoning model.
  3. Read the table. Each model shows input plus output, the percentage of its window used and a status: Fits, Tight (more than 90% used) or Too long.

What is a context window?

The context window is the model’s working memory for one request. Everything the model reads and everything it writes must fit inside it: input tokens + output tokens ≤ context window. Most providers also cap the output separately, so a 1M-token model may still stop after 64K or 128K output tokens.

The API does not remember earlier requests. In a chat, your application sends the whole conversation again every turn, so the input grows with each message until it reaches the limit. Long-running agents hit the same wall as tool results pile up.

Context window sizes of current models

Checked in November 2026 on the providers’ model pages. Gemini models can return up to 1,048,576 output tokens with long decode; 65,536 is the default synchronous limit.

ModelProviderContext windowMax output
GPT-6.2 AstraOpenAI1.05M128K
GPT-6.2 SolOpenAI1.05M128K
GPT-6.1 TerraOpenAI1.05M128K
GPT-6 LunaOpenAI1.05M128K
GPT-5.5OpenAI1.05M128K
GPT-5.4 miniOpenAI400K (max input 272K)128K
Claude Fable 5.2Anthropic1M128K
Claude Opus 5.5Anthropic1M128K
Claude Sonnet 5.5Anthropic1M128K
Claude Haiku 5.5Anthropic1M128K
Claude Sonnet 4.6Anthropic1M128K
Claude Haiku 4.5Anthropic200K64K
Gemini 4 CarbonGoogle1,048,57665,536
Gemini 4 ArgonGoogle1,048,57665,536
Gemini 4 NeonGoogle1,048,57665,536
Gemini 4 HydrogenGoogle1,048,57665,536
Gemini 3.8 FlashGoogle1,048,57665,536
Gemini 3.5 Flash-LiteGoogle1,048,57665,536

How the token counts are calculated

For OpenAI models the checker runs the o200k_base tokenizer (GPT-4o, GPT-4.1, GPT-5 family) in your browser, so the count matches what tiktoken reports for the same text. Anthropic and Google do not publish browser tokenizers, so the checker estimates: characters ÷ 2.5 for Claude Opus 4.7 and later, characters ÷ 3.25 for Claude Sonnet 4.6 and Haiku 4.5, and characters ÷ 4 for Gemini. Treat those as rough figures and keep at least 10–20% free when you are close to a limit. For exact numbers use the providers’ token counting endpoints or the LLM Token Counter for OpenAI encodings.

What to do when a prompt does not fit

  • Retrieve, do not paste. Split long documents into chunks and send only the relevant ones (retrieval-augmented generation).
  • Summarize history. Replace old chat turns with a short summary, or use the provider’s context management features.
  • Trim tool output. Large JSON results and logs are a common hidden cause of overflows; send only the fields you need.
  • Mind the cost. Filling a 1M-token window on every call is expensive. Compare options with the LLM Cost Calculator.

Frequently Asked Questions

Common questions about context windows and token limits.

The API returns an error instead of a response. Some chat apps silently drop the oldest messages instead, which means the model forgets earlier details.

Yes. Input and output share the window, which is why this checker adds your expected output to the input. Reasoning tokens also count while the model is generating.

Among the models in this checker, the GPT-6 family and GPT-5.5 list 1.05M tokens, Gemini 4 and recent Gemini Flash models 1,048,576 tokens, and current Claude models 1M tokens. Claude Haiku 4.5 has 200K.

At about 500 words per page, roughly 1,100 pages with Claude’s current tokenizer (Anthropic puts 1M tokens at about 555,000 words) and around 1,400 to 1,700 pages of English prose with OpenAI’s o200k_base. Code, tables and non-English text use more tokens per page.

Anthropic and Google do not publish tokenizers that run in the browser. The estimates use their published characters-per-token ratios; for exact counts use their count tokens API endpoints.

OpenAI lists a 400K context window for GPT-5.4 mini but a maximum input of 272K tokens, so a prompt above 272K tokens is rejected even if the total would fit.

Not automatically. Models can miss details buried in very long prompts, and every extra token adds cost and latency. Sending only relevant context usually gives better and cheaper results.

No. Counting happens in your browser. Only the tokenizer data is downloaded from the jsDelivr CDN the first time you type.