Quick start
-
Pick model
Context limit comes from the model list.
-
Fill four slots
See total, remaining, and percent used.
Estimate tokens for system, tools, history, and user slots against a model context limit. Useful when designing agent chat layout.
Privacy: processed locally, never uploaded.
↓ Paste in the input area below to see results instantly
Estimate token usage across system, tools, history, and user slots.
System
7
Tools
0
History
0
User
5
Total tokens
12
Remaining
127988
Used
0.0%
This splits budget by conversation slots; Context Window Checker compares whole text per model. Both use heuristics.
Estimate tokens for system, tools, history, and user slots against a model context limit. Useful when designing agent chat layout.
Pick model
Context limit comes from the model list.
Fill four slots
See total, remaining, and percent used.
System is system prompt; Tools is function defs; History is prior messages; User is the current turn.
When designing an AI dialogue agent, first select the target model (e.g. GPT-4) in the tool. The context window limit will be displayed automatically. Then input content into the four slots (system, tools, history, user) respectively to see real-time token usage for each section. Adjust prompt length to stay under the limit while reserving space for subsequent dialogues.
For instance, when building a customer service bot, you might allocate 50 tokens for role definition in system slot, 200 tokens for API descriptions in tools slot, 300 tokens for conversation history, and reserve 500 tokens for user input. The color-coded progress bars visually show proportions, triggering alerts when nearing the limit - indicating when to simplify tool descriptions or shorten history.
Input
gpt-4o-mini + 4 slots
Output
Per-slot tokens + remaining
Checker uses whole text; this splits by slot for multi-turn planning.
User input length is unpredictable. Reservation prevents overflows - e.g. with GPT-4-32k's 32,768 limit, if other sections use 32,000 tokens, only 768 tokens remain for users. We recommend reserving 15-20% for user input + AI response, more for complex scenarios.