Token counter
Count characters and words, then estimate tokens with two labelled heuristics.
Nothing you type is sent. The work stays in this browser.
How to use it
- Paste the text.
- Read the character, byte, and word counts. Those are exact for the text in the box.
- Read the two estimates separately. Neither one is a provider tokenizer.
One estimate divides Unicode characters by 4 and rounds up. That is a rough English rule of thumb used on this site. It is not published by a provider as their tokenizer.
The other divides Unicode characters by 2.5 and rounds up. Anthropic's models overview says one million tokens is roughly 2.5 million Unicode characters on the tokenizer introduced with Claude Opus 4.7. That ratio is a description of Claude, not of GPT or Gemini.
Punctuation, code, and languages other than English move the real count. For a bill, use the token usage the API returns.