Tamil Token-Cost Calculator
Paste any Tamil, Tanglish, or mixed Tamil+English text to compare estimated token counts, tokens per word, relative fertility, and API cost per million words across major tokenizers.
— token multiplier between best and worst tokenizer on your text
— Tamil letters (எழுத்து) and UTF-8 bytes measured directly in your browser
— estimated API cost per 1M words (best vs. worst at selected token rate)
Presets
Estimated tokens on your text
Exact vs. calibrated estimates. Word count, Tamil letter (எழுத்து) count, UTF-8 byte length, script mix, and
\p{L}+ pre-tokenizer cuts are computed exactly on your text in the browser. Per-tokenizer token counts, fertility, and API costs are client-side estimates calibrated to Zhagaram Labs' D4 benchmark (uraikal/results/d4.json, tokenizer_d4_fresh.json, and P4 Table 2) using each tokenizer's measured tokens-per-byte rates on Tamil web/literature, English (0.225 tok/B), and romanized Tamil (0.375 tok/B). OpenAI's o200k row uses our D4 measurement of openai/gpt-oss-20b. Claude's tokenizer is closed-source and marked as an unmeasured API reference estimate.
Go deeper
- Where open tokenizers break Tamil (P1) — 19 open tokenizers measured on 3,000 held-out Tamil passages, separating pre-tokenizer cuts, missing merges, and mid-character byte cuts.
- Adding Tamil to a Pretrained Hybrid-Attention Model (P4) — extending Qwen3.5 with 32,000 Tamil BPE merges cuts Tamil token counts by 2.69× while keeping English and Tanglish untouched.
- Ezhuthu-64k — our open 64,000-token Tamil tokenizer that keeps Tamil letters whole (0.004% letter cuts, 0% byte cuts).
- Measure exact token counts locally with
pip install "uraikal[tokenizers]".