Free, open-source tool

Arabic Token Counter for LLM Tokenisers

Count the tokens of Arabic text with 12 LLM tokenisers and see how many more tokens Arabic takes than English on UN text, with the cost of a page.

By Bayanat Labs· Updated · اقرأ بالعربية

The Arabic token counter is the command line and Python package behind the Arabic Token-Tax Index by Bayanat Labs. It counts the tokens of any text with the 12 LLM tokenisers in the index, prints the words it counts, and re-runs the whole measurement from the public sources. The leaderboard shows the results in your browser.

Open the leaderboard · Code on GitHub · Dataset on Hugging Face

How many more tokens Arabic takes

On the United Nations 2015 test set (3,990 Arabic–English sentence pairs from 731 UN documents), the median Arabic/English token ratio across the 12 tokenisers is 1.42: the same content takes 1.42 times as many tokens in Arabic as in English. The ratio runs from 0.93 (ALLaM) to 3.35 (Falcon3), and 11 of the 12 tokenisers need more tokens for Arabic. A ratio below 1 means Arabic took fewer tokens than English.

Tokeniser Ratio (95% CI) Tokens per 1,000 Arabic words Tokens per 1,000 English words
ALLaM 0.93 (0.92–0.94) 1,408 1,352
Falcon-H1 1.04 (1.03–1.05) 1,508 1,295
Falcon-H1R 1.12 (1.11–1.13) 1,677 1,336
Mistral Tekken 1.24 (1.23–1.25) 1,808 1,300
Qwen3.5 / 3.6 / 3.8 1.26 (1.25–1.27) 1,813 1,285
OpenAI o200k_base 1.36 (1.35–1.37) 1,884 1,232
Fanar-1 1.47 (1.46–1.49) 2,145 1,298
Gemma 4 / Fanar-2 1.48 (1.47–1.49) 2,105 1,267
Qwen3 1.57 (1.56–1.58) 2,268 1,288
DeepSeek V3 / V4 1.65 (1.64–1.66) 2,278 1,231
OpenAI cl100k_base 3.08 (3.05–3.10) 4,275 1,240
Falcon3 3.35 (3.32–3.39) 4,788 1,274

The ratio is total Arabic tokens divided by total English tokens over the same sentence pairs; the 95% interval comes from 10,000 bootstrap resamples of UN documents. Words are runs of letters, marks and digits, with Arabic clitics left attached, so compare the ratio, not the per-word figures. Fewer tokens means lower cost and more text per context window; it is not a measure of model quality.

What a page costs

A page is the content of 1,000 English words; its Arabic translation on the UN test set has about 892 words. Input price in US dollars as listed on the vendors' official price pages on 16 October 2026 (UTC); the page lists gpt-5.6-sol at a promotional price:

Model Input price per 1M tokens English page Arabic page
gpt-5.6-sol (OpenAI) $4.00 $0.00493 $0.00672
gpt-5.3-codex (OpenAI) $1.75 $0.00216 $0.00294
deepseek-v4-pro (DeepSeek) $1.32 $0.00162 $0.00268
deepseek-flash (DeepSeek) $0.30 $0.00037 $0.00061
qwen3.5-397b-a17b (Alibaba Cloud) $0.60 $0.00077 $0.00097
qwen3.8-27b (Alibaba Cloud) $0.50 $0.00064 $0.00081
qwen3.8-2.4t-a95b (Alibaba Cloud) $2.00 $0.00257 $0.00324

Output prices, the Tatoeba sets for Standard, Egyptian and Algerian Arabic, and the tokenisers without a published price are on the leaderboard and in the dataset.

Install and run

pip install "git+https://github.com/Bayanat-Labs/arabic-token-tax-index@v0.1.0"

arabic-token-tax count "تقرير الأمين العام عن أعمال المنظمة"     # tokens per tokeniser
arabic-token-tax count --tokeniser o200k_base,qwen3.5 "نص عربي"   # selected tokenisers
arabic-token-tax words "تقرير الأمين العام"                       # wordcount-v1 words

Python 3.10 or later. The PyPI package has not been released yet; pip install arabic-token-tax-index will work once it is published. Tokenizer files are fetched from their publishers on first use, at pinned revisions: tokenizer files only, never model weights. To reproduce the release, clone the repository at the v0.1.0 tag and follow its README.

from datasets import load_dataset
results = load_dataset("Bayanat-Labs/arabic-token-tax-index", "results", split="train")
segments = load_dataset("Bayanat-Labs/arabic-token-tax-index", "segments_un", split="test2015")

What it counts

  • OpenAI encodings through OpenAI's open-source BPE library (encode_ordinary), Hugging Face tokenizer.json files through the tokenizers library (add_special_tokens=False) and tokenizer.model files through sentencepiece (no BOS or EOS).
  • Each segment is encoded on its own, with no special tokens.
  • Tokenisers whose files are not public, or sit behind an access request, are not measured in this version; the dataset lists each one with the reason.
  • Add a tokeniser by adding an entry with a pinned revision to config/tokenisers.yaml.

Cite as

Bayanat Labs (2026). Arabic Token-Tax Index, version 0.1.0 (run 2026-10-16). https://huggingface.co/datasets/Bayanat-Labs/arabic-token-tax-index. CC BY 4.0.

Give the version and run date with every number. The release record, with licences and changelog, is the Arabic Token-Tax Index on Bayanat Labs Open.

Licence and contact

Harness code and leaderboard: Apache-2.0. Index data and documentation: CC BY 4.0. UN text: distributed under the United Nations Parallel Corpus disclaimer; credit the United Nations as the source. Questions, corrections and requests for new tokenisers: hello@bayanatlabs.com.

Need Arabic evaluation data for your models?

The token counter is free. For licensed Arabic evaluation sets and private test suites, see Bayanat Bench.