Skip to content

CapyToken · tool no. 9


.

Exact token counts and model costs, computed entirely in your browser. All local.

CapyToken counts tokens exactly with OpenAI's tokenizers and estimates what a prompt costs on GPT, Claude, Gemini and other models, offline and with no API key.

Updated · by Unfolding Dimensions

01 · The text

Loading the counter…

The guide

How to count tokens and estimate LLM API cost

  1. Step 1

    Paste the prompt you are about to send.

  2. Step 2

    Read the exact counts under OpenAI's o200k_base (GPT-5 and GPT-4o era) and cl100k_base (GPT-4 era) encodings.

  3. Step 3

    Set your expected output length and compare input and output cost across GPT, Claude, Gemini, Grok, DeepSeek, Llama, Qwen and Mistral.

API pricing is per token, and the same text is a different number of tokens for different models. CapyToken counts with OpenAI's real tokenizers and puts the old rules of thumb — characters ÷ 4, words × ¾ — beside them as a cross-check.

For Claude, Gemini and other non-OpenAI models there is no public exact tokenizer to run, so those rows are clearly labelled as estimates rather than presented as exact.

The rate card carries the date its prices were verified, and context-window bars warn you when a prompt is close to — or over — a model's limit.

Questions

How many tokens is my text?

Paste it in. For OpenAI models the count is exact. As a rough guide, one token is about four characters of English.

Are the Claude and Gemini counts exact?

No, and the tool says so: they are estimates based on OpenAI's tokenizer. Exact counts for those models come from their own APIs.

Do I need an API key?

No. Counting and pricing run in your browser with no key and no account.

Is my prompt uploaded?

No. Your text is never sent anywhere. The tokenizer files load from this site the first time you count, then everything runs locally.

How current are the prices?

The rate card shows the month it was verified. Prices change, so treat it as a dated snapshot and check the provider before a large spend.