Home / Tools / AI token counter

AI token counter

Paste any text to estimate how many tokens it will use with AI models like Claude, GPT and Gemini. Your text stays in your browser and is never sent anywhere.

  • AI tool
  • Runs in your browser
  • Tested 19 November 2026
  • Sources
Characters
Words

This is an estimate. Each model family uses its own tokenizer, and counts for the same text can differ by a third or more between them. For an exact figure, use your provider's token counting tool, such as the count_tokens endpoint in the Claude API. Price it up with the AI API cost calculator.

How the estimate works

For ordinary English text, two rules of thumb are widely used: one token is about 4 characters, and about three quarters of a word. The counter works out both and shows the average, with the range between them.

The estimate is good for prose. Expect more tokens than this for:

  • Code, because of symbols, indentation and unusual names.
  • Numbers and data, which are often split into small pieces.
  • Languages other than English, especially those that don't use the Latin alphabet.

Getting an exact count

Every provider can count tokens exactly for its own models. Anthropic's API has a token counting endpoint, OpenAI publishes a library called tiktoken, and Google's Gemini API has a count tokens method. Use those when you need precise numbers, for example to stay just under a model's limit.

Want to know what tokens actually are? Read what is a token?

Sources

Where the formulas and figures on this page come from. We test every tool against worked examples from these before publishing.