Free tool
Token counter
Count the tokens in any text, see exactly where it splits, and estimate what it will cost to send to an AI model.
Your text stays in your browser. Nothing is sent to a server.
- Tokens
- 0
- Exact count once you type
- Words
- 0
- Characters
- 0
- Tokens per word
- –
Estimate the cost
–
Uses standard list prices with no caching or batch discounts. Other providers count tokens differently, so treat non-OpenAI costs as estimates.
How this token counter works
AI language models do not read letters or words. They read tokens: chunks of text from a fixed vocabulary, usually somewhere between a single character and a whole word. Before a model sees your prompt, a tokenizer chops it into those chunks and turns each one into a number.
This page runs OpenAI's open-source o200k_base tokenizer directly in your browser, the same one used by GPT-4o and OpenAI's newer models. That is why the count is exact for those models rather than an estimate. The coloured view shows each token as its own block, so you can see which words stay whole and which get split.
Why Claude, Gemini, and other models give different counts
Every model family trains its own tokenizer with its own vocabulary, so the same paragraph can be a slightly different number of tokens on each. For ordinary English the counts are usually in the same ballpark, which makes this counter a good planning tool for any model. For billing-grade accuracy on another provider, use that provider's own token-counting endpoint.
Differences grow with unusual text. Source code, tables of numbers, URLs, emoji, and languages with non-Latin scripts tend to split into more pieces, and tokenizers disagree more on how to split them.
Token rules of thumb for English text
| Text | Roughly | Approximate tokens |
|---|---|---|
| 1 token | 4 characters or ¾ of a word | 1 |
| A short sentence | 15 words | 20 |
| A paragraph | 100 words | 130 |
| A page of prose | 500 words | 650–700 |
| 1,000 words | 2 pages | 1,300–1,400 |
| A long report | 10,000 words | 13,000–14,000 |
| A novel | 90,000 words | 120,000+ |
How to cut your token count
- Trim long chat histories: summarise older turns instead of resending them.
- Send only the relevant part of a document. Retrieval (RAG) does this automatically.
- Strip boilerplate such as repeated headers, signatures, and HTML markup.
- Ask for shorter answers. Output tokens usually cost the most.
- Use prompt caching if your provider offers it for a long, repeated system prompt.
Common questions
Is this token count exact?
It is exact for OpenAI models that use the o200k_base tokenizer, which covers GPT-4o and OpenAI's newer models. Other providers such as Anthropic and Google use their own tokenizers, so the same text can come out somewhat higher or lower there. For an exact count on another provider, use that provider's token-counting API.
Is my text sent anywhere?
No. The tokenizer downloads to your browser the first time you type, and all counting happens on your device. Nothing you paste is uploaded or stored.
How many tokens is one word?
In typical English prose, one word averages about 1.3 tokens, or put the other way, one token is about three quarters of a word. Short common words are usually one token. Long, rare, or technical words split into several.
Why does code or non-English text use more tokens?
Tokenizers are built from the text they were trained on, which is mostly English prose. Common English words get their own tokens, while code symbols, unusual spacing, and many other languages get broken into smaller pieces, so they need more tokens for the same amount of meaning.
Do output tokens cost the same as input tokens?
Usually not. Most providers charge several times more for each output token than for each input token, because generating text is more work than reading it. That is why the cost estimate asks for an expected output length separately.
Does the system prompt count toward tokens?
Yes. Everything the model reads counts: the system prompt, earlier messages in the conversation, any documents or tool results you include, and the reply it writes. In a long chat, the history is often the biggest share of the bill.
Sources and further reading
- What are tokens and how to count them? — OpenAI Help Center
- tiktoken: fast BPE tokenizer for OpenAI models — OpenAI on GitHub
- Token counting — Anthropic docs
Keep reading
- AI model comparison
Context windows and prices for every major model, side by side.
- How many tokens is 1,000 words?
1,000 English words is roughly 1,300 to 1,400 tokens. The common rule of thumb, from OpenAI’s guidance, is that one token is about three-quarters of a word, or about four characters of English text. Exact counts vary by model, language and content type, so use a tokenizer or token-counting API when precision matters.
- What are tokens in AI?
Tokens are the small chunks of text that AI language models read and write, usually a whole short word, part of a longer word, or a punctuation mark. In English, one token averages about four characters or three-quarters of a word. Tokens matter because AI pricing, speed, and context-window limits are all measured in them.
- What is a context window in AI?
A context window is the maximum amount of text, measured in tokens, that a language model can consider at once. It covers everything in a single request: the system prompt, the conversation so far, any pasted documents or tool results, and the answer the model writes. Anything outside the window is invisible to the model.
- What is a system prompt?
A system prompt is a set of instructions given to an AI model before the conversation starts, telling it who it is, what it should do and how it should behave. Users usually never see it. It sets the role, tone, rules and background knowledge, while user prompts are the individual questions or requests that follow.