← back to flaviocopes.com

Context window fit checker

← All tools

Paste the pieces of your prompt stack and see whether they fit each model's context window — with a bar showing how much headroom you have left.

~~~

System prompt

Docs / context

Chat history

Expected output (reserve)

Token count uses chars÷4 (~±15% vs real tokenizers). Context sizes from a snapshot.

~~~

Total estimate

 · Paste at least one field to see fit results.

Fit by model

Sorted by fit first, then by lowest context usage. Models that overflow appear at the bottom.

ModelContextUsedBarStatus

Your text never leaves the browser — nothing is sent to an API. This is a planning tool, not a tokenizer. Trim RAG context or pick a larger-window model when you overflow.

~~~

About this tool

Context windows are hard limits. If your system prompt plus retrieved docs plus chat history plus room for the reply exceeds the model's window, the provider truncates or errors — often silently at the start of the prompt.

We sum four buckets you control and compare the total against published context sizes for major models. The chars÷4 heuristic matches ourtoken cost calculator; use your vendor's tokenizer when the bill matters.

~~~

Read more