Token counter
What the token counter does
Paste in a block of text and this tool gives you a quick estimate of how many tokens it would take up, the unit AI models use to measure both context window limits and, for paid APIs, cost. The count is based on splitting the text at whitespace and around punctuation, which tracks reasonably closely with how models actually break text apart, without being an exact match for any one of them.
It runs in your browser. Paste, read the number, done. Nothing is uploaded, there is no account, and there is no limit on how much text you check or how often you come back.
Tokens, in plain terms
What a token actually is, in plain terms
A token is the chunk of text a model actually processes internally, and it is not the same thing as a word or a character. A short common word is often one token. A longer or less common word can split into two or three. Punctuation marks frequently count as their own token, separate from the word next to them.
This matters because every model has a maximum number of tokens it can accept in a single request, its context window, and every paid API charges by the token rather than by the word or the character. Getting a rough count before you paste a long document somewhere saves you from hitting a limit or a bill you did not expect.
How it works
How to count tokens in your text in three steps
Nothing to configure. The count updates as fast as you can paste.
- Step 1
- Paste your text into the input box.
- Step 2
- The estimated token count appears immediately, on your own device.
- Step 3
- Trim your text if you're close to a limit, and check the count again.
Straight answer
Is this the exact count a specific model would use?
No, and no tool that runs entirely in your browser without downloading a specific model's tokenizer can honestly promise that. Each model family, whether from OpenAI, Anthropic, Google or elsewhere, uses its own tokenizer, built from its own vocabulary, trained on its own data. Two different models can and do count the same sentence differently, sometimes by a meaningful margin.
This tool gives you a fast, reasonable estimate based on where a typical model is likely to split text: at word boundaries and around punctuation. Treat the number as a planning figure, close enough to budget your text against a limit, rather than the precise value an API would bill you for or enforce as a hard cutoff.
What moves the number
What makes a token estimate vary from the real thing
Code is one of the biggest sources of divergence: symbols, indentation and unusual identifiers tokenise very differently across models, and a word-and-punctuation estimate does not capture that behaviour precisely. Non-English text, especially languages that do not separate words with spaces, can tokenise at a very different rate than English does, sometimes using more tokens per character, sometimes fewer.
Repeated or unusual punctuation, uncommon technical vocabulary, and long strings of numbers or symbols all push a real tokenizer's count away from a simple word-based estimate, in either direction.
Why it matters
Why context windows and token limits exist at all
A model's context window is the maximum amount of text, counted in tokens, it can consider at once, spanning your prompt, any earlier conversation, and its own reply. Go over that limit and older content gets dropped or the request fails outright, which is why a rough count before you paste something long is worth the ten seconds it takes.
For paid usage, the token count also drives the bill directly, since most providers charge per token for both what you send and what the model sends back. Estimating before you commit to a long input avoids an unpleasant surprise on either front.
Who uses it
Who uses a token counter, and when
Developers building against a paid API use it to sanity-check a prompt template before running it against real traffic, catching an oversized input before it becomes an oversized bill. Anyone working with a model's context window, feeding in a long document, a full conversation history, a large code file, uses it to see roughly how close they are to the ceiling.
Writers and researchers preparing text to paste into a chat interface use it to gauge whether a long passage will fit in one go or needs splitting into parts first.