Skip to content

Token counter

Models do not read characters or words — they read tokens. Paste your text to see how many tokens it becomes, and where the boundaries fall.

Try:

Names are written the way each vendor's own model documentation writes them, which is not always the name on the chat page you use.

Result

Nothing counted yet. The encoding dictionary is only downloaded once you type — it weighs megabytes, so we do not fetch it for visitors who just read the page.

How the counting works

Models do not read characters — they read tokens, chunks of a few letters each, drawn from a fixed dictionary the model was trained with. Where the vendor has published that dictionary (OpenAI's o200k_base and cl100k_base), this tool loads the real one into your browser and runs the real split — the pieces you see are exactly what the model would read. Where the vendor has not published it, the tool refuses to fake a split: it shows a clearly marked estimate derived from the vendor's own characters-per-token figure and explains where that figure comes from. The distinction matters because limits, prices and context windows are all counted in tokens — the only unit the model itself uses.

Common questions

1 Is the token count exact?
For models that use OpenAI’s published o200k_base and cl100k_base dictionaries, yes — the tool runs the real tokenizer in your browser and shows the actual pieces. For models whose vendors have not published a tokenizer (Anthropic, Google, and OpenAI’s newest), the number is a marked estimate: characters divided by the vendor’s own characters-per-token figure, chosen to over-count rather than under-count.
2 Is my text uploaded anywhere?
No. The encoding dictionary is downloaded to your browser and the counting happens on your device. The site is static files with no server runtime, so there is nowhere to upload to — you can confirm that in the network panel.
3 Why do different models count different totals for the same text?
Each model reads text through its own dictionary of pieces. The same sentence splits differently under different dictionaries, so the totals differ — the same document can be 66 tokens for one model and about 122 for another.
4 Why does the same word sometimes cost a different number of tokens?
Position matters. Spaces are usually glued to the start of the word that follows, so “the” at the start of a sentence and “ the” in the middle are two different pieces. Casing changes the split too.

Your text stays in your browser. This site has no server runtime at all — the dictionary is downloaded to your machine and the counting happens there, so nothing you paste is uploaded, logged or stored.

Need to know whether a long document fits a model's context window? Context fit takes a file.