Measuring and shrinking the hidden cost of writing in your language

Developers working in Arabic, Hindi, Thai, Amharic and many other languages notice the same thing on their bills and in their context limits: the same message costs noticeably more tokens than its English equivalent. Some have started building open-source libraries specifically to reduce that overhead for Arabic text sent to Claude, GPT and Gemini, calling it a tokenizer tax.
This article explains where the extra cost comes from, how to measure it for your own content with any API, and which techniques reduce it without hurting answer quality. It is for anyone building multilingual products, from chatbots to document pipelines, who wants their limits and budgets to stretch as far as they would in English.
Frequently asked questions
What is a tokenizer?
The component that splits text into tokens, the units a model actually reads and writes. Tokenizers are built from statistics over training text, so frequent words and fragments get single tokens while rare ones are split into several pieces.
What is the tokenizer tax?
The extra number of tokens a language needs compared with English for the same meaning. Languages that were less represented when the tokenizer was built, or that use scripts with many characters, are split into more and smaller pieces.
Does the tax affect quality as well as cost?
It can. More tokens per word means less real content fits in the context window, and some models are simply less fluent in languages that were rare in their training data. The effect varies a lot between models.
How does Gemini compare with other providers?
Each provider uses its own tokenizer, and efficiency per language differs between them and between model generations. Instead of trusting general claims, measure your own texts with each API's reported token counts.
Is translating to English before sending a good idea?
Sometimes. It can cut tokens for long inputs, but translation adds its own cost and can lose nuance, names or legal precision. It works best for internal processing steps whose output is not shown verbatim to users.
Which is better for multilingual apps, a big hosted model or a regional model?
Large hosted models usually cover many languages reasonably. Models trained with a focus on a region's languages can be more efficient and fluent in those languages. Test both on real user messages before deciding.
Does the free-ai model support my language?
free-ai replies in the language you write in for many common languages, but quality and token efficiency vary by language. Measure it with your own texts using the usage numbers it returns.
Do daily token limits on this site count all languages the same?
Yes. The 10,000,000-token daily budget per IP counts tokens regardless of language, so a language that needs more tokens per word uses the budget faster.
How text becomes tokens
A model never sees letters directly. Before processing, text is split into tokens using a vocabulary learned from a large sample of text. Common English words often become a single token. Less common words, and words in scripts that were rarer in that sample, are broken into several shorter pieces or even individual bytes.
Because pricing, rate limits and context windows are all counted in tokens, this splitting determines how much your text costs and how much of it fits in one request.
Why English is usually cheapest
Training corpora for most widely used models contain more English than any other language, so English fragments dominate the vocabulary. Other languages get fewer dedicated tokens and are split more finely.
Scripts and diacritics matter
Languages with rich morphology, optional diacritics or many characters per word tend to produce more tokens. Arabic with full vowel marks, for example, can tokenise differently from the same text without them.
Numbers and code
Digits, dates, URLs and code are often split into many small tokens in every language. Long tables of numbers or pasted logs can therefore cost far more than the visible amount of text suggests, regardless of the surrounding language.
Where the extra tokens hurt
The tax shows up in three places. Cost rises directly on metered APIs. Context shrinks, because a document that fits easily in English may not fit in another language. And rate limits measured in tokens per minute or per day are reached sooner.
For chat products the effect accumulates: every turn resends the history, so a conversation in a token-heavy language grows expensive faster than the same conversation in English.
Keep in mind that tokenisers change between model generations. A new release may handle your language better or worse than the previous one, so repeat your measurements after every model upgrade rather than relying on old numbers.
Output tokens count too
Answers in the user's language are also tokenised the same way, and output tokens are often priced higher than input. Long replies in a token-heavy language are the biggest contributor to cost.
High volume magnifies everything
For organisations processing large volumes of messages or documents, a modest per-message overhead becomes a significant line item. That is why the tax matters most in enterprise pipelines rather than personal chat.

Measure it with your own text
General claims about token efficiency are a poor guide, because they depend on the model, the text type and even the formatting. The reliable method is to send representative samples of your own content and read the token counts the API returns.
Prepare parallel samples: the same paragraph in English and in your target languages, written naturally rather than machine-translated if possible. Then compare the prompt_tokens figure for each. The script below does this against any OpenAI-compatible endpoint.
Subtract the fixed overhead
Each request adds a few tokens for message formatting. For precise ratios, use longer samples of several paragraphs so that the fixed overhead becomes negligible.
from openai import OpenAI
client = OpenAI(base_url="https://api.apifreegemini.com/v1", api_key="anything")
samples = {
"en": "Please confirm your appointment for Saturday morning at ten.",
"ar": "يرجى تأكيد موعدك يوم السبت صباحاً في العاشرة.",
"hi": "कृपया शनिवार सुबह दस बजे की अपनी अपॉइंटमेंट की पुष्टि करें।",
}
base = None
for lang, text in samples.items():
r = client.chat.completions.create(
model="free-ai", max_tokens=1,
messages=[{"role": "user", "content": text}],
)
n = r.usage.prompt_tokens
base = base or n
print(f"{lang}: {n} prompt tokens ({n / base:.2f}x English)")Reduce input tokens without losing meaning
Most savings come from sending less, not from clever encoding. Remove boilerplate, repeated signatures, quoted email chains and markup before text reaches the model. Normalise whitespace and strip invisible characters. For Arabic and some other scripts, removing optional diacritics where they carry no meaning for the task can reduce tokens noticeably.
Specialised libraries for particular languages bundle such normalisation rules. If you adopt one, test carefully that it does not change meaning for your domain, for example in religious, legal or poetic text where marks matter.
Keep instructions in English if quality holds
System prompts can often stay in English even when users write in another language. Instructions are resent on every request, so a compact English system prompt saves tokens on every turn. Test that the model still answers in the user's language.
Normalise consistently
Whatever cleaning you apply, apply it the same way every time and keep the cleaning code in one place. Inconsistent normalisation makes token counts jump between runs and makes it hard to tell whether a change in cost came from users or from your pipeline.
- Strip HTML, tracking text and quoted reply chains
- Normalise whitespace and remove zero-width characters
- Remove optional diacritics only when they carry no meaning for the task
- Summarise long history into a short running summary
- Send only the relevant passages instead of whole documents

Reduce output tokens
Because answers are tokenised just as heavily, ask for concise replies. Set a sensible max_tokens, request bullet points instead of prose where appropriate, and avoid instructions that invite the model to restate the question.
For structured tasks, ask for JSON with short English keys and values in the user's language only where needed. Labels such as categories or statuses can be English codes that your interface translates.
Let the interface translate fixed strings
Do not ask the model to generate text that never changes, such as button labels or standard disclaimers. Store those in your app's translation files and let the model produce only the variable part.
Cap length per feature
A chat answer, a notification and a summary each need different maximum lengths. Setting them per feature prevents an occasional rambling reply from consuming a large share of your budget.
Translate-then-process pipelines
For internal steps such as classification, routing or extraction, translating input to English first can reduce tokens in later steps and sometimes improve accuracy on models stronger in English. The translated text never reaches the user, so small stylistic losses do not matter.
The trade-off is an extra call and the risk of losing names, numbers or legal nuance. Keep the original text alongside the translation, and extract critical values such as amounts and dates from the original.
When not to translate
Do not translate text that will be quoted back to users, legal documents, or creative writing where the original wording matters. In those cases, pay the tax and save elsewhere.
Mixed-language conversations
Many users switch between their language and English within one message, especially for technical terms. That is fine for most models. Do not force everything into one language; instead, measure the typical mix of your users and budget for it.

Choosing models with your languages in mind
Token efficiency and fluency in a language differ between model families and even between generations of the same family. Regional models trained with a focus on specific languages can be more efficient and more natural there, while global hosted models offer broad coverage and stronger reasoning.
Include token counts in your evaluation alongside answer quality. A model that is slightly better but uses many more tokens in your users' language may cost more per accepted answer. The evaluation approach in choosing a model tier applies directly, with token counts added as a column.
For products serving one region, it can be worth testing a model built with that region's languages in mind alongside global models. Launch announcements of such models often focus on benchmarks; your own token counts and quality checks on real messages are a better basis for a decision.
Testing multilingual prompts for free
APIFreeGemini is not affiliated with Google, and its free-ai model is an independent open-weight model of about 35B parameters, not Gemini. It replies in the language you write in and returns token usage on each response, which makes it a convenient free place to compare how your texts tokenise and how normalisation changes the counts.
Keep its limits in mind: the 32,000-token context and the daily budget of 10,000,000 tokens per IP count all languages equally, so token-heavy languages use them faster. For production multilingual quality on hard tasks, test strong hosted models as well. If long documents are the issue, the techniques in working with long context combine well with the savings described here.
Avoid sending personal data in tests
Each request leaves a technical log with time, IP, User-Agent and token counts. Use sample texts rather than real customer messages when measuring tokenisation.

Send a test prompt to the keyless free-ai endpoint from the home page, no sign-up or key required.
Read also
- Why did a Gemini model vanish from my picker, and what should I do?
- Are real-time Gemini voice agents ready for production calls?
- Should you build on Gemini Flash or Flash-Lite for your app?
- Gemini CLI vs Antigravity vs OpenCode: which terminal agent fits?
- Are cheap Gemini Pro links and resold AI plans safe to buy?