EXACT COUNTS · BRING YOUR OWN KEY
Billing-exact Claude and Gemini token counts.
Anthropic and Google don't publish their tokenizers, so exact counts require their official count endpoints — which are free and don't generate a response. Your key and text go directly from your browser to the provider; this site has no server and never sees either. For instant no-key estimates, use the Claude or Gemini counters.
Exact tokens (official API)
—
Our offline estimate
—
Estimate drift
—
Note: the model id field is prefilled with a best guess from our catalog — check your provider's model list if the API reports an unknown model. Counting a whole conversation instead? Use the chat token counter.
FAQ
Exact counting FAQ
Why does exact Claude or Gemini counting need an API key?
Anthropic and Google have not published their tokenizers, so the only billing-exact count comes from their official endpoints: Anthropic count_tokens and Gemini countTokens. Both are free to call and do not generate a model response. Any tool claiming exact offline Claude or Gemini counts is estimating.
Is my API key safe here?
The key is used directly from your browser to call the provider endpoint over HTTPS — it is never sent to freetokencounter.com, which has no server to receive it. Optionally it can be remembered in your browser local storage. Best practice still applies: use a key with a low spend limit, and rotate it if you ever paste it somewhere untrusted.
Does this cost anything to run?
No. Both count endpoints are free and do not consume model tokens — they only tokenize. Standard API rate limits apply.
Why does my exact count differ slightly from a real request?
Real chat requests add provider-side message framing (roles, separators, system fields), typically a handful of tokens per message. The count endpoints measure the message you send; budget a small margin on top for full conversations.