Skip to content

Free AI tool · counts in your browser

Token counter and tokenizer for LLMs.

Paste a prompt and see its token count for the model you plan to use, how the text splits into tokens, whether it fits the context window with room for the reply, and what it costs. OpenAI counts are exact and run in your browser. Claude and Gemini counts are exact when they come from the provider, and every estimate is labelled as one.

Added to your text when checking the context window.

How it splits

Loading the tokenizer…

Tokens (estimate)
…
Words
55
Characters per token
-
Context window
1.05M

Exact: counted in your browser with OpenAI's o200k_base encoding.

Building on an LLM? We design AI features that stay inside budget.AI developmentCompare API prices

Privacy: OpenAI counts run in your browser. Text leaves it only when you press "Count exactly".

Prices checked on 18 October 2026. Public list prices in US dollars per 1M tokens, copied by script from models.dev (MIT, list prices, cached-input prices, context windows) and LiteLLM model price file (MIT, batch api prices and reranker prices). Nothing is typed by hand. Confirm a price on the provider's own page before you commit to it; providers change prices and add surcharges (long prompts, regions, priority tiers) that a summary table cannot show.

What a token is


Why the same text costs different amounts on different models.

  • 01

    Tokens are pieces of words

    Models read and bill text in tokens: common words are one token, rare words, numbers and code split into several. Each provider trains its own tokenizer, so one prompt can be a different number of tokens on GPT, Claude and Gemini.

  • 02

    The context window is a hard limit

    A model can only read so many tokens at once, and the window holds your prompt and the reply together. The counter adds the tokens you keep for the reply, so you can see whether a long document will fit before you send it.

  • 03

    Exact or estimate, always labelled

    OpenAI publishes its tokenizers, so those counts run here exactly. Claude and Gemini are counted by the providers’ own free count endpoints when available. When they are not, the number is an estimate and the page says how it was made.

FAQs · Token counter


Token counting · frequently asked questions

Exact and estimated counts, privacy, and why providers disagree about the same text.

Yes, for every model OpenAI’s own tiktoken library maps to an encoding: the counter runs that encoding (o200k_base or cl100k_base) in your browser. A model too new for that map is counted with o200k_base and labelled as an estimate. The count covers the text only, not the few tokens of chat formatting the API adds per message.
When exact counting is switched on, the text goes once to Anthropic’s count_tokens endpoint or Google’s countTokens endpoint, which use each model’s real tokenizer. Both are free to call. Without that, Claude is estimated with OpenAI’s o200k_base count and Gemini with characters divided by four, and the page says so.
Not for OpenAI models, and not for estimates: those run in your browser. Only when you press Count exactly for Claude or Gemini does the text go to our server and on to that provider, once, to be counted. We do not log or store it. A shared link keeps the text in the part of the address browsers never send to a server.
Each provider trains its own tokenizer with its own vocabulary, so the same sentence splits differently. Code, numbers and languages other than English vary the most. Anthropic also notes that its newer models use a tokenizer that produces more tokens for the same text than earlier Claude models.
The most tokens a model can handle in one request, counting your prompt and its reply together. If the prompt plus the space you keep for the reply is larger than the window, the request fails or the input has to be cut. The counter shows how much room is left.
It depends on the language and the tokenizer. Google’s guide for Gemini puts 100 tokens at about 60 to 80 English words, or about four characters per token. Paste your own text and the counter shows its actual words and characters per token for the model you chose.

Next step


Building a product on top of an LLM?

QalbIT builds AI features into web and mobile products, with prompts, retrieval and caching designed around what each request costs.

More free tools


More free tools

Each one opens on a worked example and shows its answer without a signup.

All free tools