Context Window Checker
PopularCheck prompt size against a model context window.
Loading…
About Context Window Checker
When an API rejects a request as too long, the useful question is by how much. Choose a model, paste a prompt or a whole document, and the checker counts its tokens, exact for most OpenAI models and estimated for the rest, against the window size listed beside the model name. You get tokens used, tokens left, a percentage and one of three verdicts: safe, near limit from 85% of the window, or over limit once the text is larger than the window.
Features
- Window size shown next to every model in the list
- Three statuses: safe, near limit and over limit
- Tokens used, window size and remaining tokens as separate cards
- Exact or Estimate label with the encoding used
- Accepts up to 10 MB of pasted text
Limitations
- Only the text you paste is measured. The model's reply, system prompt, chat history and tool definitions share the same window, so leave headroom.
- Counts for models other than OpenAI's use the o200k_base encoding as a stand-in, so they are estimates and the provider's real count can differ.
- The near-limit mark is fixed at 85% of the window, text over 10 MB is rejected, and window sizes come from a dated catalog rather than a live feed.
How it works
- Choose a model in the Model list; each option shows its context window in tokens.
- Paste your prompt or document into Text to check.
- Read the status badge, the percentage and the progress bar above the cards.
- Compare the Tokens used, Window size, Remaining and Precision cards to see the numbers behind the verdict.
- If the status is near limit or over limit, trim or split the text and watch the figures update.
- Use Reset to clear the box, or Share to copy a link to the tool.
Example input
Explain the difference between REST and GraphQL APIs in simple terms, with one example for each.Frequently asked questions
- In a real request, yes: the prompt and the reply share the window. This checker measures only the text you paste. To include the reply, use the LLM token counter, where Expected output tokens is added to the meter and warns if input plus output would not fit.
- Their tokenizers are not available offline, so the page counts with o200k_base and labels the result Estimate. The catalog notes that Anthropic's newer tokenizer yields more tokens than its earlier ones, so o200k_base is only a rough basis. Treat a near-limit result on an estimated model as possibly over.
- Not on this page, which takes pasted text only. The LLM token counter has an Upload file button for text-based files such as .txt, .md, .json and source code. For a PDF, extract the text first and paste it here.
- Every model in the catalog is listed with its window in tokens, for example GPT-4o at 128,000. The sizes were compiled from each provider's own documentation on the catalog date, so a change a provider makes later will not show until the catalog is refreshed.
- No. The tokens are counted by a script in your browser and the text is not sent to a server. The Share button copies only the address of the tool, never what you typed.
Related tools
- LLM Token Analyzer & Prompt OptimizerCount tokens, estimate API usage, optimize prompts, and discover ways to reduce unnecessary token consumption.
- LLM Cost CalculatorEstimate and compare AI API costs based on tokens, usage, and model pricing.
- PDF to TextExtract text from PDF files in the browser.
- Word CounterCount words, characters, sentences and get reading time.
