Prompt Token Counter
See exactly how many tokens your text uses. For OpenAI models the counter uses the real tokenizers – o200k_base for GPT-4o, GPT-4.1, the o-series and newer models, and cl100k_base for GPT-4, GPT-3.5 Turbo and the text-embedding-3 models – so the count is exact. Turn on “Show tokens” to see where the text is split. Other providers such as Anthropic, Google and Meta use their own tokenizers; for them the tool shows a clearly labelled estimate. Add a price per million tokens to see the input cost.
- Runs in your browser
- No sign-up
- Free to use
OpenAI tokenizers give exact counts (gpt-tokenizer, about 1–2.5 MB, downloaded once). Other providers use their own tokenizers; for them the count is an estimate based on characters. Chat requests add a few tokens per message for formatting. The text never leaves your browser.
How to use Prompt Token Counter
- Paste your text.
- Choose the tokenizer.
- Optionally show the tokens and add a price.
- Read the exact count.
Prompt Token Counter features
Exact OpenAI counts
o200k_base and cl100k_base.
Token view
See every token.
Estimates labelled
For other providers.
Cost
From your price per 1M.
Large texts
Up to 2 million characters.
Private
Built in your browser; nothing is sent to an AI service.
When to use Prompt Token Counter
- Checking prompts against context limits.
- Estimating API costs.
- Comparing languages’ token use.
- Debugging truncated prompts.
Prompt Token Counter FAQ
Why do non-English texts use more tokens?
Tokenizers were trained mostly on English; other scripts often need more tokens per word.
Is the count exact for Claude or Gemini?
No. Their tokenizers are different and not all are public, so the tool shows an estimate.
Do chat messages add tokens?
Yes, a few tokens per message for formatting, not included here.
Is my text uploaded?
No. The tokenizer runs in your browser.
What tokens are
Language models read text as tokens – pieces of words, whole words or punctuation. Prices, context windows and rate limits are all measured in tokens, so counting them precisely avoids surprises.
In English a token averages about four characters, but code, numbers and other languages vary widely.
This tool does not call an AI model. It turns your answers into a well-structured prompt in your browser, so it costs nothing, works offline once loaded and never sends your text anywhere. Paste the result into ChatGPT, Claude, Gemini, Copilot or any other assistant, or into the system message of an API call.
Good prompts are specific about the task, the context the model cannot know, the audience and the shape of the answer. The fields on this page cover exactly those parts; leave optional fields empty when they do not apply, and the prompt stays short.
Review the answer you get: language models can be confidently wrong, especially about facts, numbers, names and recent events. Ask for sources or mark claims to check, and keep personal or confidential data out of prompts unless your organisation allows it.
Keep the prompts that work. A small library of tested prompts – with a note on which model and settings they were used with – saves time and makes results more consistent across a team. The other prompt tools on this site help you format, template, fill and measure them.