Appearance

Token Counter

/token-counter/

GPT-5, GPT-4.1, GPT-4o, o-series exact–
GPT-4, GPT-3.5 exact–
Claude estimate–
Gemini estimate–

Claude and Gemini are rough estimates from ratios measured with public tokenizers (about 10% error)

Character mix
Characters
0
Hangul
0
Latin letters
0
Digits
0
Spaces and symbols
0
Other characters
0

Related tools

Comments

0/500

About this tool

Why count tokens before sending text to a language model

Language models such as ChatGPT, Claude and Gemini read and write text not character by character but in pieces called tokens. API prices are the number of input and output tokens multiplied by a unit price, and both the amount of text you can send at once (the context window) and the maximum length of a reply are measured in tokens. When you summarize a long document or design a prompt, the token count, not the character count, tells you what it will cost and whether it fits.

Read moreShow less

The gap is larger for languages other than English. An English sentence is roughly one token per word, but Korean text can differ by more than a factor of two depending on how a tokenizer was built. This token counter counts pasted text exactly for current and older GPT models, estimates Claude and Gemini from measured ratios, and shows all four side by side.

How tokenizers split text, and how GPT, Claude and Gemini differ

Most language models split text with a BPE (byte pair encoding) style method. Character sequences that often appear together in training data are merged into vocabulary entries, and text is broken into combinations of those entries, so common English words become one token while rare words, or scripts that were scarce in the training data, are split into several. GPT-4o, GPT-4.1, the o-series and GPT-5 use o200k_base with about 200,000 entries, while GPT-4 and GPT-3.5 use cl100k_base with about 100,000. The tool runs the tiktoken vocabularies published by OpenAI directly in the browser, so both counts are exact.

For example, the Korean sentence '안녕하세요. 오늘 날씨가 정말 좋네요.' (21 characters, roughly 'Hello. The weather is really nice today.') is 11 tokens with o200k_base but 24 with cl100k_base. The English sentence 'Hello, the weather is really nice today.' (40 characters) is 9 tokens with both. Doubling the vocabulary brought in many Korean fragments, which is why Korean takes close to half as many tokens on current GPT models.

Counting about 156,000 characters of this site's Korean tool descriptions gave an average of 1.69 characters per token for o200k_base, 1.14 for cl100k_base, 1.07 for the tokenizer Anthropic once published for older Claude models, and 1.72 for the Gemma 3 tokenizer. About 52,000 characters of English descriptions came out nearly the same across all four, at 3.6 to 4.0 characters per token. Digits vary by tokenizer: '1234567890' is 4 tokens on GPT but 10 on Gemma 3, which splits numbers one digit at a time.

Reading GPT, Claude and Gemini token counts for your situation

If you are building on an API, read the row for the model you actually use, multiply the input tokens by the price per million tokens on that vendor's price list, and you have the cost of one call. Replies count too, so estimate the expected output the same way and add it, then multiply by daily calls for a rough monthly figure. The same prompt yields different counts on different models, so compare the rows when you switch.

If you paste long reports, papers or meeting notes into ChatGPT or Claude, it is enough to confirm the text is well under the context window. Very long text can be sent chapter by chapter, and it is wise to leave room because system instructions and earlier messages share the same window. Expanding Character mix shows how many characters are Hangul, Latin letters, Digits, and Spaces and symbols, which helps explain why an English original and its Korean translation differ in tokens.

Where the token estimates come from, and their limits

The two GPT rows are exact counts from public vocabularies, but the Claude and Gemini rows are estimates for reference. The current Claude and Gemini tokenizers are not published in a form usable in a browser. So about 290,000 characters of this site's text were counted with the tokenizer Anthropic published for models before Claude 2 (Anthropic notes it is not accurate for Claude 3 and later) for Claude, and with the Gemma 3 tokenizer (the Gemma 3 technical report states it shares the tokenizer of Gemini 2.0) for Gemini. Ratios were then fitted for how many tokens Hangul, Latin letters, English words, digits, spaces, symbols and other characters each correspond to.

Fitting on half of the text and checking on the other half gave a median per-paragraph error of 3 to 5 percent, with 90 percent of paragraphs within 10 percent. That error is measured against the public reference tokenizers, so the gap to the actual current models may be larger. When you need exact numbers, for billing for instance, use each vendor's official tools such as Anthropic's token counting API or countTokens in the Gemini API.

Chat requests also add a few tokens per message for role markers, images and files are counted separately, and output tokens are priced differently from input. Text is counted only inside this browser and never sent to a server; the GPT vocabularies (about 3 MB) are downloaded once when you first enter text. Your text is kept in this browser's storage so it is still there next time (text over about 20,000 characters is not kept), and Reset clears it.

FAQ

How many characters are in one token?

It depends on the model and language. English is usually around 4 characters per token. Measured on about 156,000 characters of Korean text on this site, GPT-4o and later (o200k_base) averaged 1.69 characters per token and GPT-4 and GPT-3.5 (cl100k_base) 1.14.

Is the ChatGPT token count exact?

The rows for GPT-5, GPT-4.1, GPT-4o and the o-series, and for GPT-4 and GPT-3.5, are exact counts from the tiktoken vocabularies OpenAI published. In chat format, though, each message adds a few formatting tokens, so the billed amount can be slightly higher.

Why are the Claude and Gemini token counts only estimates?

The current Claude and Gemini tokenizers are not published in a form that runs in a browser. The tool estimates from ratios measured by counting real text with the public older Claude tokenizer and the Gemma 3 tokenizer. The error is usually within 10 percent, but it may be larger against the latest models.

Why does Korean or other non-English text use more tokens than English?

Tokenizer vocabularies are built from training data dominated by English, so English words stay whole while Hangul is split into smaller pieces. Larger, newer vocabularies narrow the gap: the example Korean sentence is 24 tokens on GPT-4 but 11 on GPT-4o.

How do I calculate API cost from tokens?

Multiply input tokens by the model's input price and expected output tokens by its output price, then add them. Prices are quoted per million tokens and change often, so check each vendor's official price list.

Is my text sent to a server?

No. Token counting happens only in this browser and the text is never uploaded. It is kept in this browser's storage so it is still there next time, and Reset clears it.