dilettanteee
tools/ai-companion-tools/prompt-token-counter

Prompt Token Counter

Count real tokens in a prompt for a specific model.

Inputs
Count

Paste a prompt to count its tokens.

About Prompt Token Counter

The Prompt Token Counter counts the exact number of tokens a prompt uses for a specific OpenAI model, using the same tokenizer the model does. Tokens, not words, determine API cost and whether a prompt fits in the model's context window.

How to use it

  1. Choose the model you plan to use.
  2. Paste your prompt.
  3. Read the token count and the share of the model's context window it takes up.

Good to know

  • In English, one token is roughly four characters or three quarters of a word, but code, numbers and other languages can use far more tokens per word.
  • Different model families use different tokenizers, so the same text can produce different counts.
  • Supported models: GPT-4o, GPT-4 Turbo, GPT-4, GPT-3.5 Turbo, o1, o1-mini, GPT-4.1 and GPT-5.
  • Your text is processed in your browser. It is not sent to this site or to any AI provider.

Common questions

Does this count tokens for Claude or Gemini?

No. Those models use their own tokenizers, so counts from this tool are only exact for the listed OpenAI models.

Why are chat API costs a little higher than the count suggests?

Chat APIs add a few formatting tokens around each message. The difference is small but grows with many short messages.