Skip to content

Benchmarks · Benchmark

Same Text, More Tokens: 6 Tokenizers by Language

The same UN declaration takes 1,524 tokens in English and 7,744 in Hindi on GLM-5.3's tokenizer. Metarix counted six current tokenizers across 19 languages, code and JSON, and found escaped JSON can cost 8x more.

Pavel Holmgren · Nov 30, 2026 · 8 min read

Share

Bar chart: tokens for the same Hindi and Urdu text relative to English on six tokenizers, from 1.6x to 5.1x
Metarix, original editorial graphic from a Metarix tokenizer measurement, Nov 30, 2026
On this page

The first 30 articles of the Universal Declaration of Human Rights come to 1,524 tokens in English on GLM-5.3's tokenizer and 7,744 tokens in Hindi. Same content, 5.1 times the tokens, and on a per-token price list, 5.1 times the bill. On Mistral Large 4's tokenizer the same Hindi text is 2,432 tokens.

Metarix counted tokens with six published tokenizers on Nov 30, 2026, across 19 languages, two code samples and one JSON payload. The finding that matters for a budget: in English the six tokenizers agree within 4%, so list prices compare fairly. In Hindi, Urdu, Bengali or Thai they do not, and the tokenizer can move the cost more than the price list does.

The six tokenizers and the text we fed them

Every number below is a token count from a tokenizer file a model maker publishes, run locally. No API was called and no model generated anything. The tokenizers, with the date each Hugging Face repo was last updated:

The text is Articles 1 to 30 of the declaration in 19 languages, from the NLTK copy of the Unicode UDHR project files, with article headings removed and every file normalized to Unicode NFC. The declaration is useful here because the same legal text exists in all of these languages. Alongside it we counted a 1,724-character Python module, a 1,286-character TypeScript module and a 24-record JSON API response, all written for this test, plus the same JSON minified.

The script ran on Python 3.13.18 with tiktoken 0.14.0 and Hugging Face tokenizers 0.23.3. Counts exclude chat templates and special tokens. Claude and Gemini are not in the table because Anthropic and Google do not publish their tokenizers as files; both offer counting endpoints instead, covered at the end.

English is the only place they agree

On the English text the six counts run from 1,517 (DeepSeek) to 1,572 (Qwen). That 3.6% gap is small enough that a per-million-token price is a fair way to compare models for English traffic. Every other language spreads out.

Scroll the table horizontally on smaller screens.

Tokens for UDHR Articles 1–30, same text per row (counted Nov 30, 2026)
LanguageOpenAI o200k_baseDeepSeek V4.1 FlashQwen3.8 27BMistral Large 4GLM-5.3Kimi K3.1 Pro
English1,5241,5171,5721,5471,5241,523
Chinese (Simplified)1,7391,2241,2531,6771,2511,175
Arabic1,8472,1311,7871,7362,3332,766
Urdu2,4943,5033,0872,4114,0773,415
Hindi2,4244,5013,3052,4327,7444,479
Bengali2,6023,1983,5412,3617,6864,754
Thai3,0392,5431,8493,8616,6925,597
Vietnamese2,3483,6162,2132,2992,3334,789
Metarix measurement with each model's published tokenizer file (Hugging Face) and tiktoken 0.14.0; NFC text, no special tokens. Rows compare tokenizers on identical text. Columns are token counts, not prices.

Read the table across a row, not down a column. Within a row the text is identical, so the difference is purely the tokenizer: the same Hindi passage is 2,424 tokens on o200k_base and 7,744 on GLM-5.3, a 3.2× gap. The same Thai passage is 1,849 tokens on Qwen and 6,692 on GLM-5.3, 3.6×. Urdu is tighter, 2,411 to 4,077 (1.7×).

Heatmap of token counts for 19 languages relative to English on six tokenizers: OpenAI o200k_base, DeepSeek V4.1 Flash, Qwen3.8 27B, Mistral Large 4, GLM-5.3 and Kimi K3.1 Pro
Token count for each language divided by the same tokenizer's English count. Metarix measurement, Nov 30, 2026: UDHR Articles 1–30, six published tokenizers, NFC text. Graphic: Metarix.

The multipliers in the chart divide each language by that tokenizer's English count. They mix two things: how efficiently a tokenizer handles a script, and how long that translation is. Chinese looks cheaper than English on four of the six (0.77× to 0.82×) partly because the Chinese text is 2,203 characters against 8,277 for English. The South Asian scripts sit at the other end on every tokenizer: Hindi from 1.57× (Mistral) to 5.08× (GLM-5.3), Bengali from 1.53× to 5.04×, Urdu from 1.56× to 2.68×.

No single tokenizer is cheapest everywhere. Across the 18 non-English languages, Qwen3.8, Mistral Large 4 and o200k_base have the lowest average multipliers (1.43×, 1.44× and 1.47×), and o200k_base has the lowest worst case (1.99×, on Thai). GLM-5.3 and Kimi K3.1 Pro average above 2×. Qwen3.8 is the best of the six on Thai, Vietnamese, Korean, Japanese and Indonesian but third on Hindi. Kimi is the most efficient on Chinese and last of the six on 10 of the other 17 languages.

Turning the multiplier into money

Prices change; tokenizers change less often. To keep the tokenizer effect separate from any real price list, the example below uses one made-up price for every model: $0.50 per million input tokens. It is not a quote for any provider.

Take an app whose monthly input would be 400 million tokens if it were all English. At $0.50 per million, that is $200. Serve the same content in Hindi and the bill becomes about $314 on a tokenizer like Mistral's (1.57×) and about $1,016 on one like GLM-5.3's (5.08×). Nothing about the price list changed.

Now two hypothetical models for that Hindi traffic. Model A lists $0.80 per million and needs 1.6× English tokens; Model B lists $0.50 and needs 3.0×. Per English-equivalent million tokens, A costs $1.28 and B costs $1.50. The model that is 37.5% cheaper on the price page is about 17% more expensive for this traffic. That is the comparison a per-token price table, including our own LLM API pricing tracker, cannot make for you.

Code and JSON: close, with one easy saving

Code is close to English. The Python module came to 422–461 tokens across the six (a 9% spread) and the TypeScript module to 354–396 (12%). For a coding assistant, tokenizer choice is a minor cost factor next to context size and output length.

JSON is where formatting matters. The pretty-printed response (two-space indents) was 2,999–3,935 tokens; the same data minified was 1,909–2,480. Minifying cut the count by 32.5% (DeepSeek) to 37.0% (Qwen) on every tokenizer. Qwen3.8 is the outlier on indented JSON, 30% above o200k_base, so the saving is largest there. If your agent passes tool results or records back into the prompt, sending them without indentation is a one-line change:

python
import json

payload = json.dumps(records, separators=(",", ":"), ensure_ascii=False)

The ensure_ascii=False part matters more than the whitespace for non-English data. Python's default escapes every non-ASCII character as \uXXXX. We wrapped the first 2,000 characters of the Hindi text in a one-field JSON object both ways: escaped, it took 5,185 tokens on o200k_base instead of 635 (8.2×), 8,365 instead of 802 on Qwen3.8 (10.4×) and 6,775 instead of 1,815 on GLM-5.3 (3.7×). The Urdu passage showed the same pattern. If your pipeline serializes user text with default settings, check this first.

A Unicode detail that doubled the count

The Vietnamese file arrived in decomposed form (NFD): each accented letter stored as a base letter plus separate combining marks, 10,197 characters instead of 8,640. Counted as downloaded, it took 2.31× the tokens of the normalized text on o200k_base, 2.28× on Mistral, 2.35× on GLM-5.3, 1.70× on DeepSeek and 1.48× on Kimi. Qwen's count did not change, because its tokenizer normalizes to NFC itself.

Decomposed text can arrive from file names, PDF extraction and older databases, and it looks identical on screen. Normalizing before you send costs nothing:

python
import unicodedata

text = unicodedata.normalize("NFC", text)  # JavaScript: text.normalize("NFC")

The tokenizer can change under the same brand

A model upgrade can change the count for the same prompt. Anthropic's token counting docs state that Claude 4.7 and later models, and Claude Mythos Preview, use a newer tokenizer that produces approximately 30% more tokens for the same input text than earlier models, and tell developers to recount prompts against the model they plan to use (checked Nov 30, 2026). A per-token price cut on a new model can be partly or fully offset by that alone.

What these counts do not tell you

  • Quality. Fewer tokens is not a better answer. This measures cost per text, not how well a model reads Urdu.
  • Output and reasoning tokens. We counted input text only. Output in the same language will usually follow the same tokenizer pattern, but reasoning tokens and answer length depend on the model and were not measured.
  • Exact API bills. Hosted APIs add chat-template and system tokens, and a provider serving open weights may count differently from the published file. Check the usage field on real responses.
  • Claude, Gemini and GPT-6.x. Their tokenizers are not published as files, so they are not in the table.
  • Your text. One formal legal document per language is a fair test of scripts, not of your users' chat style, code mix or transliterated text such as Roman Urdu.

How to measure your own traffic

  1. Take a few hundred real prompts per language from your logs, with secrets and personal data removed.
  2. Count them with each candidate's tokenizer: tiktoken for OpenAI encodings, the tokenizer.json from the model's Hugging Face repo for open-weight models, Anthropic's messages.count_tokens endpoint for Claude, and Gemini's `count_tokens` for Gemini.
  3. Work out the effective price: list price × (that model's tokens for your sample ÷ your baseline model's tokens for the same sample).
  4. Normalize text to NFC and send JSON minified with ensure_ascii=False before you compare anything.
  5. Recount whenever you switch models or a provider ships a new version.

If you route between models, fold the multiplier into the routing rule. Our cost per successful task piece shows how; the tokenizer multiplier belongs in the same formula. If prompts repeat, prompt caching reduces the cost of the repeated part, but it does not change how many tokens the text is cut into.

The take

For English-only products, per-token list prices are a reasonable way to compare these models: the tokenizers land within 4% of each other. For anything in Hindi, Urdu, Bengali, Thai or a mix of languages, they are not. Count your own text on each candidate first, then compare price × tokens, and make sure non-English text is not being sent as \u escapes. On this test the tokenizer alone moved the cost of identical Hindi text by 3.2×, more than the difference between most list prices.

Sources

Tools covered in this article

Frequently asked questions

Why does the same text use more tokens in Hindi or Urdu than in English?
Common English words usually map to a single token, while Devanagari, Bengali or Urdu text tends to be split into smaller pieces. How much smaller depends on the tokenizer: on our test the same Hindi text ranged from 2,424 to 7,744 tokens.
Are output tokens affected the same way?
Output is cut by the same tokenizer, so a Hindi answer will usually take more tokens than an English one of the same content. We counted input text only; answer length and reasoning tokens depend on the model and were not measured.
How do I count tokens for Claude or Gemini?
Neither publishes its tokenizer as a file. Anthropic offers a messages.count_tokens endpoint and Google offers count_tokens in the Gemini API; both return the count for a request before you send it.
Does minifying JSON change how the model reads it?
Minified JSON carries the same data without indentation and line breaks. In our test it cut the token count by 32.5% to 37% across six tokenizers. Models read minified JSON fine, but check your own outputs if you rely on exact formatting.

Share

Related on Metarix