PUBLIC.INTERNET

LLM Context Window Token Counter

This page estimates how many tokens your text will use and compares that against the context window of the model you pick. The dropdown lists 16 models grouped by vendor, with window sizes typed into the page that range from 128,000 tokens (DeepSeek R2) to 10,000,000 (Llama 4 Scout). It is a quick fit check before you paste a large document or repo dump into a chat or API call. The count is an estimate, not the model's real tokenizer output.

Characters
0
Words
0
Est. Tokens
0

How to check whether a prompt fits

  1. Pick a model in Select LLM Model. The window size is shown next to each name, for example Claude Sonnet 4.5 at 200,000 tokens.
  2. Paste your prompt, code, or document into Your Text, Code, or Prompt. The Characters, Words and Est. Tokens tiles update as you type.
  3. Read the Context Window Analysis panel. It shows a usage bar, the window limit, your estimated tokens, and tokens remaining.
  4. Check the status banner. Under 70% reads Safe, 70% to 90% reads Caution, and 90% or more already reads Over Limit, even though the window is not yet full.
  5. Switch models in the dropdown to see the same text against a different window without re-pasting.

Why the estimate is characters divided by four

The estimate is ceil(characters / 4). Four characters per token is a rough average for English prose in common BPE tokenizers. Every model family has its own tokenizer, so the real number can differ by well over the margin the on-page note mentions, especially for source code, minified JSON, and non-Latin scripts, which tend to use more tokens per character.

Use the result as a go or no-go signal, not a billing figure. If the bar sits at 40%, you are fine. If it sits at 85%, count with the vendor's own tokenizer before you send, because the real number may be higher. The bar and percentage stop at 100%, so text twice the size of the window looks the same as text that just fills it. Compare Your Estimated Tokens with the limit to see how far over you are.

Remember that the window covers more than your input. The model's reply, any system prompt, and earlier chat turns all draw from the same budget. That is why the banner turns to Caution at 70% rather than waiting for 100%. The window sizes are values typed into the page, so confirm them against the vendor's docs for the exact model version you call.