Skip to content

Token Counter

Count the tokens of a prompt or document with the exact OpenAI tokenizers (o200k_base for GPT-4o and newer, cl100k_base for GPT-4 and GPT-3.5), and see characters, words and a rough estimate for other models. Useful for staying within context windows and estimating API costs.

Reset

Frequently asked questions

What is a token?

Language models read text as tokens, pieces of words produced by a tokenizer. In English a token is about four characters or three quarters of a word on average, but code, numbers and other languages use more.

Which tokenizers are exact?

o200k_base (GPT-4o, GPT-4.1, o1, o3, o4-mini), cl100k_base (GPT-4, GPT-3.5 Turbo, text-embedding-3), p50k_base and r50k_base (older GPT-3 and Codex models), counted with js-tiktoken, the JavaScript port of OpenAI's tiktoken.

What about Claude, Gemini or Llama?

They use their own tokenizers. The tool shows a heuristic estimate of one token per four characters, which is close for English prose; use the provider's token counting API for exact numbers.

Do special tokens count?

Yes. Text that looks like a special token, such as <|endoftext|>, is counted as that token, like the API would treat it.

Are chat messages counted with overhead?

No. The count covers the text only. Chat APIs add a few tokens per message for roles and formatting.

Is my text stored?

No. It is tokenized for this request only.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.