Context Window Checker
Paste a prompt or enter a token count to see which models it fits in, with room left for the response.
Loading tokenizer…
Frequently asked questions
What is a context window?
A context window is the maximum number of tokens a model can process in one request, counting your prompt, any documents or history you include, and the response it generates.
How do I know if my prompt fits a model?
Add the tokens in your prompt to the tokens you expect in the response. If the total is within the model's context window, and the response is within its maximum output, the request fits. The checker above does this for every model.
Why reserve tokens for the output?
The response shares the context window with the prompt. A prompt that fills the window leaves no room for an answer, so the request is rejected or the answer is cut short.
How accurate is the token count?
Text is counted with the o200k_base tokenizer, which is exact for current OpenAI models and an estimate for other families. Leave some margin when a prompt is close to a model's limit.
Context sizes come from the live model catalogue. See long-context models for the largest windows, or read what a context window is.