SSAYF & CO.TOOLS
Free audit

AI Token Counter

Count the exact tokens in your prompt with the OpenAI tokenizer, and estimate the cost before you call an AI API.

Free Exact OpenAI tokenizer Runs in your browser

Loading the tokenizer…

About the AI Token Counter

AI models do not read words, they read tokens: small chunks of text, roughly 4 characters or three-quarters of a word in English. Token counts decide whether a prompt fits a model's context window and how much an API call costs.

This counter uses OpenAI's real o200k tokenizer (the one used by GPT-4o and newer OpenAI models), running entirely in your browser. It also shows the older cl100k count, words and characters, and estimates cost from the price you enter.

How to use it

  1. Paste your prompt or document.
  2. Read the token count, words and characters instantly.
  3. Enter a price per million tokens to estimate the cost.
  • Real OpenAI tokenizers (o200k and cl100k)
  • Text never leaves your device
  • Cost estimate for any model

Frequently asked questions

What is a token?

A token is a piece of text that an AI model processes as one unit. Common English words are often one token, while long or rare words are split into several. On average, 1 token is about 4 characters or 0.75 words in English.

Which tokenizer does this use?

OpenAI's o200k_base tokenizer, used by GPT-4o and newer OpenAI models, plus cl100k_base used by GPT-4 and GPT-3.5. The counts are exact for those models.

Does it work for Claude, Gemini and Llama?

Those models use their own tokenizers, so counts differ, usually by up to about 15 to 20%. The o200k count is a good estimate for planning.

Why does cost depend on input and output?

Most AI APIs charge separately for the tokens you send (input) and the tokens the model writes back (output), and output is usually more expensive. Check your provider's current pricing page.

Is my text private?

Yes. Tokenization runs in your browser. Nothing is sent to our servers.

Sayf & Co.

Tools find the problems. We fix them.

Get a free audit of your website, search presence and social channels — with a clear, prioritised plan to grow.

Get your free audit