Prompt Length Checker: Count Tokens Before You Send
Paste a prompt to see an estimated token count, plus words, characters and lines, and how much of a 128K, 200K or 1M-token context window it would fill. The token count is an estimate (characters divided by 4), not a real tokenizer count. Optional AI suggestions say whether the prompt looks too long, too short or about right, and what to change. Your prompt is sent to our server to count it, and to an AI model through OpenRouter only if you ask for suggestions. We don't store it.
Built by Jose Hunt · Checked 20 Nov 2026
How to use
Paste your prompt to see token counts, model limits, and get AI-powered optimization tips.
Tokens: o200k_base, exact for recent OpenAI models. Compare cost by model in the Token Counter.
- check_circle Tokens, words & characters
- check_circle 128K, 200K & 1M context bars
- check_circle AI-powered optimization suggestions
What is a Prompt Length Checker?
A prompt length checker tells you how long a prompt is, and whether it fits a model's context window, before you send it. Models read text as tokens, not words, and each model has a context window: a cap on the tokens it can handle in one request, counting your prompt and its reply together (Anthropic).
Paste a prompt and you get four numbers: tokens, words, characters and lines. Below them, three bars show what share of a 128,000, 200,000 and 1,000,000-token window the prompt would fill. The counting runs on our server with fixed rules and no AI. Get AI Suggestions is a separate button that sends your prompt to an AI model through OpenRouter.
The limit: tokens are counted with o200k_base, the tokenizer OpenAI uses for GPT-4o, GPT-4.1 and the GPT-5 family. For those models the count is exact. Claude, Gemini and other models split text their own way, so for them it's an estimate. To compare price and context window model by model, use the Token Counter.
For ways to shrink a prompt, see how to reduce AI prompt tokens. To cut tokens with AI, use the Token Reducer.
When should you use it?
- check_circle Checking that a system prompt plus a pasted document won't run into a model's context limit
- check_circle Comparing two drafts of a prompt to see which is shorter before it goes into an app
- check_circle Getting a rough token figure to estimate the cost of a prompt you'll send many times
- check_circle Getting a quick second opinion on whether a prompt is vague or padded
Example outputs
How it works
Tokens: your prompt goes through the o200k_base encoding (Microsoft.ML.Tokenizers, the same encoding as OpenAI's tiktoken library). tiktoken maps OpenAI's GPT-4o, GPT-4.1, GPT-5 family, o1, o3 and o4-mini models to it (tiktoken, checked 25 November 2026), so for them the count is exact. Other models use their own tokenizers, so for them it's an estimate that can be off either way.
Words: each unbroken run of letters, digits, underscores, straight apostrophes and hyphens. A curly apostrophe splits a word, so don’t typed with a curly apostrophe counts as two words, and don't with a straight one counts as one. Characters: everything in the box, including spaces and line breaks, counted in UTF-16 units, so most emoji count as 2. Lines: line breaks plus one, so a line break at the very end adds an empty line.
Context bars: the token count divided by 128,000, 200,000 and 1,000,000, shown to two decimal places. These sizes are fixed in the code and don't follow new model releases. 128,000 is GPT-4o's context window, while the original GPT-4 has 8,192 (OpenAI GPT-4o, OpenAI GPT-4). 200,000 is the window of Claude Haiku 4.5, Sonnet 4.5 and older Claude models; Anthropic's newer models have 1M (Anthropic). 1,000,000 matches the Gemini models Google lists (Google). Past 100%, the percentage keeps climbing but the bar stays full and keeps the same colour.
The counts update as you type, on our server. Your prompt isn't stored.
Get AI Suggestions sends your prompt to an AI model through OpenRouter. The model is asked to judge whether the prompt is too verbose, too terse or well-sized, suggest specific improvements, and keep its answer under 200 words. The answer streams in as it's written and varies between runs.
Tips for better results
- tips_and_updates For GPT-4o, GPT-4.1 and GPT-5 models the count here is exact. For Claude, use Anthropic's token counting endpoint, which is free to use with rate limits (checked 25 November 2026).
- tips_and_updates Leave room for the answer. The context window holds the prompt and the reply, so a prompt that fills 95% leaves little space for output.
- tips_and_updates Look up your own model's context window in its provider's docs. The three bars are fixed reference sizes, not your model's limit.
- tips_and_updates Treat the AI suggestions as a review, not a fix. They can add instructions, so check the token count again after you apply them.