Yueser ← All tools

Token Counter

Paste a prompt to estimate how many Tokens it costs and how much that is in money. Chinese and English are counted separately — at the same character count, Chinese usually costs more Tokens.

This is an estimate, not exact tokenization

The exact Token count depends on each model's vocabulary (GPT uses cl100k_basecl100k_base, Claude uses its own, and they all differ), so pinning it down in the browser would take a vocabulary file of several MB. Here we use the usual industry rule of thumb: English is about 4 characters / Token, Chinese about 1.5 characters / Token, and the error is usually within ±15% — good enough for budgeting.

For exact numbers, use each provider's official tokenizer or the usage field returned by the API.

When to use it

  • You are about to run the same long prompt through the GPT or Claude API hundreds or thousands of times and want the order of magnitude of the bill before committing budget.
  • A prompt is close to the context window, or you want to know whether the Chinese or the English version of the same content costs fewer tokens.

When not to

  • You need to reconcile an invoice, or price input and output separately: this tool has one price field and ignores output tokens, cache reads and batch discounts.
  • The text is mostly code, URLs, base64, Japanese kana or emoji — the character-to-token ratio drifts far from the rule of thumb and the error goes well past ±15%.
Limits and privacy

Pasted text is counted in the browser only — never uploaded or stored. Limits: a character-based rule of thumb (≈4 chars/Token English, ≈1.5 chars/Token Chinese) with roughly ±15% error, worse for code and Chinese; one flat price, excluding output, cache, images and batch discounts.

Frequently asked

How accurate is the token estimate?

It is an order-of-magnitude estimate, not a count. The tool uses rules of thumb: about 4 characters per token for English and about 1.5 characters per token for Chinese, with typical error within ±15% — for ordinary prose. Code, JSON, URLs, base64, runs of punctuation, kana and emoji deviate a lot, and ±30% is not unusual. Chinese varies most between vocabularies: in GPT's cl100k_base one Chinese character is often close to one token or more, so this tool can underestimate Chinese. For an exact number use the official tokenizer, or read the usage field the API returns.

Is Chinese really more expensive than English?

Not necessarily — it depends on the vocabulary. A common English word is often one token (about four characters), while many vocabularies spend roughly one token per Chinese character, so the same information tends to cost more tokens in Chinese; but Chinese is also more compact, and the two effects often cancel out. What actually drives the bill is output: output tokens usually cost 2–5× input tokens, and Chinese answers tend to run longer. Constraining the output format usually saves more than switching language.

What price should I enter, and why does it not match my invoice?

Enter the current official price for your model in USD per million tokens — the tool never updates prices itself. Mismatches usually come from: separate input and output prices (there is only one field here); system prompts, tool schemas and conversation history all being billed; cache hits and writes priced differently; batch API discounts; and retries being charged again. Treat the number as a budget ceiling, not an invoice.