Free tool · runs in your browser
LLM token counter
Paste text to estimate its token count, see words and characters, and check how much of a model's context window it would use.
An estimate: real counts vary by model (often by 10 to 35%). For exact counts, use the provider's token counting API.
Quick answer
AI models read text as tokens: pieces of words. In English, one token is roughly 4 characters or three quarters of a word; code, numbers and other languages usually use more. Every model family has its own tokenizer, so this tool gives an estimate. For exact numbers, use your provider's token counting API, such as Anthropic's count_tokens endpoint.
How to use it
- Paste your text. A prompt, a document or a conversation.
- Read the estimate. You get estimated tokens, words, characters and lines.
- Check the context window. See what share of a 200K or 1M token context the text would fill.
Frequently asked questions
How many tokens is a word?
In English, about 1.3 tokens per word on average, or roughly 4 characters per token. Other languages and code use more.
Why do different models give different token counts?
Each model family uses its own tokenizer, which splits text differently. The same text can differ by 10 to 35% between models.
How do I count tokens exactly?
Use the provider's own tokenizer or token counting API; for Claude, the Messages API has a count_tokens endpoint.
What is a context window?
The maximum number of tokens a model can read in one request, including your prompt, the conversation and its answer.
Is my text uploaded?
No. The estimate is calculated in your browser.
Do spaces and punctuation count as tokens?
Yes. They are part of the text the tokenizer splits, and are often attached to the following word.
Why does Chinese or Hebrew text use more tokens?
Tokenizers are trained mostly on English text, so other scripts are split into smaller pieces and use more tokens for the same meaning.
Do images count as tokens?
Yes. Models that read images turn them into tokens too, depending on the image size. This counter estimates text only.
Do output tokens count toward the context window?
Yes. The prompt, the conversation and the model's answer, including any thinking, must all fit in the context window.
How can I reduce the number of tokens in a prompt?
Remove repetition and examples you do not need, send only the relevant parts of documents, and use prompt caching for long text that repeats.