BroadRouter

GLM token counter

Updated

In short: This counter loads the tokenizer.json from the zai-org/GLM-5.3 repository, so counts match GLM 5.3. It has 154,856 token IDs and is a 20 MB download, cached after the first use. English prose takes about 129 tokens per 100 words, code about 200 and Arabic about 244, rank 5 of 5 on our Modern Standard Arabic texts (1 = fewest tokens).

Free, no sign-up, runs in your browser: nothing you type is sent anywhere.

Try:

… tokens

Tokens and cost of this text per model
ModelTokensChars per tokenAs inputAs output
GLM 5.3
GLM 5.3 tokenizer
…………
DeepSeek V4.1 Flash
DeepSeek V4.1 Flash tokenizer
…………
Qwen3.8 27B
Qwen3.8 27B tokenizer
…………
Gemma 4 VL 26B
Gemma 4 tokenizer (Google base model)
…………
GPT (o200k)
OpenAI o200k_base
…………

Cost = tokens × the model's published price per 1M input or output tokens. GPT is shown for reference only (no BroadNet price). Measured ratios for every tokenizer are in the tokenizer efficiency dataset. Rows marked ≈ are estimates from measured characters per token until you load that tokenizer; loading downloads its tokenizer.json from Hugging Face once and keeps it in your browser cache.

Create an account ($5 starting credit)

Other counters: DeepSeek · Qwen · Gemma · GPT · Llama 3 · Llama 4 · Kimi · Mistral Small · Ministral 3 · gpt-oss · Phi-4 · Gemma 3 · MiniMax · Nemotron 3 · Qwen3 · all models. Prices synced 2026-11-14.

Report a wrong price or number (email to info@broadnet.ai, with this page's link and your inputs filled in).

How it works

  1. Paste text into the box or pick a sample. The GLM 5.3 tokenizer is preselected and downloads once (20 MB) when you start.
  2. The text appears split into tokens, a colour per token; tick "Show token IDs" to see the numbers.
  3. Tick "Chat format" to include the system prompt and chat-template tokens a request adds.
  4. Compare the table with the other models and copy the link or download CSV.

About the GLM tokenizer

GLM 5.3 uses a byte-level BPE tokenizer with 154,820 learned tokens and 36 special tokens such as [gMASK], <sop> and the <|system|>, <|user|> and <|assistant|> role markers. Its pre-tokenizer is close to OpenAI's: English words, contractions and up to three digits at a time.

On our dataset texts GLM is among the most compact on English and code, but it needs the most tokens on Arabic (244 per 100 words) and Hindi (455). If you send a lot of Arabic, compare it with Qwen in the table before choosing.

GLM tokenizer facts
TokenizerGLM 5.3 tokenizer
Sourcezai-org/GLM-5.3 (commit ba32f8c)
Token IDs154,856 (154,820 in the base vocabulary)
Context window1,048,576 tokens
Price per 1M tokens$0.78 input · $3.46 output
English prose129 tokens per 100 words (rank 3 of 5)
Arabic244 tokens per 100 words (rank 5 of 5)
Python code200 tokens per 100 words (rank 1 of 5)
Download20 MB, once; then cached in your browser

Tokens per 100 words measured on the open texts of our dataset with every tokenizer (2026-11-15; Arabic = Modern Standard Arabic); rank 1 = fewest tokens. All counts: tokenizer efficiency dataset. On Arabic the most compact was Qwen, on code GLM. Full table on the token counter.

The cost formula

input cost  = tokens × input price per 1M  ÷ 1,000,000
output cost = tokens × output price per 1M ÷ 1,000,000

Worked example

The English sample in the counter is 260 words. The GLM 5.3 tokenizer splits it into 295 tokens. Sent to GLM 5.3 as a prompt it costs $0.00023; written by the model as an answer it costs $0.0010. Prices are per one million tokens, so multiply the count by the price and divide by 1,000,000.

Questions

Which tokenizer does GLM 5.3 use?

A byte-level BPE tokenizer with 154,856 token IDs, published as tokenizer.json in the zai-org/GLM-5.3 repository. This page loads that exact file, pinned to commit ba32f8c.

Why is the GLM tokenizer download so large?

The file holds the full vocabulary and merge list in JSON, 20 MB uncompressed. It is fetched only when you use the GLM counter and is then kept in your browser cache, so later visits do not download it again.

How many tokens does the GLM chat template add?

About 12 tokens for one user message with the official template's defaults: [gMASK], <sop>, a system turn with a reasoning-effort line, the user marker and the assistant marker with an opening think tag. A system prompt adds one marker token plus its text.

Is GLM good for Arabic text?

GLM 5.3 reads Arabic, but its tokenizer is the least efficient of the five we measured on Arabic: Modern Standard Arabic sentences need 1.77× the tokens of their English translations. The Arabic token counter shows the difference for your own text.

What does GLM 5.3 cost per token?

$0.78 per 1M input tokens and $3.46 per 1M output tokens on BroadNet, with a 1,048,576-token context. See the GLM 5.3 model page for tools and structured output.

Go deeper

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity