---
title: "GLM token counter: the real GLM 5.3 tokenizer | BroadRouter"
description: "Count GLM 5.3 tokens with the official tokenizer from zai-org, in your browser. See the token split, the chat-template overhead and the cost per request."
url: https://broadrouter.com/tools/glm-token-counter/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# GLM token counter

Updated 2026-11-15

**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:

 Chat format: add a system prompt and the model's chat-template tokensSystem promptYou are a helpful assistant.Text to countEvery request you send to a language model is split into tokens before the model reads it. A token can be a whole word, part of a word, a space, a number or a punctuation mark. Common English words such as "the", "model" and "price" are usually one token each, while rare words, names and long technical terms are broken into several pieces. Because providers bill per token, the same text can cost different amounts on different models. Each model family trains its own tokenizer on its own mix of languages and code, so its vocabulary decides how efficiently a sentence is packed. A tokenizer trained mostly on English packs English tightly and spends more tokens on Arabic, Hindi or Chinese. A tokenizer with a larger vocabulary usually needs fewer tokens for the same text, but it is not a guarantee. The practical lesson is simple. Count tokens with the tokenizer of the model you will actually call, not with a rule of thumb. Rules of thumb are fine for a first budget, yet they drift by twenty or thirty percent as soon as the text is not plain English. When the bill matters, measure a real sample, keep the numbers, and check them again whenever you switch models or change your prompt template. Context windows are counted in tokens too. A model with a window of one million tokens can read a very long contract or a large code base in one request, but only if the prompt, the history and the answer all fit inside that limit together.

…

tokens

Show tokens forGLM 5.3 — GLM 5.3 tokenizerDeepSeek V4.1 Flash — DeepSeek V4.1 Flash tokenizerQwen3.8 27B — Qwen3.8 27B tokenizerGemma 4 VL 26B — Gemma 4 tokenizer (Google base model)GPT (o200k) — OpenAI o200k\_base Show token IDs Show spaces

Tokens and cost of this text per model
| Model | Tokens | Chars per token | As input | As 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](https://broadrouter.com/data/tokenizer-efficiency/). 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)](https://inference.broadnet.ai/?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-glm-token-counter&utm_content=tool) ·

Other counters: [DeepSeek](https://broadrouter.com/tools/deepseek-token-counter/) · [Qwen](https://broadrouter.com/tools/qwen-token-counter/) · [Gemma](https://broadrouter.com/tools/gemma-token-counter/) · [GPT](https://broadrouter.com/tools/gpt-token-counter/) · [Llama 3](https://broadrouter.com/tools/llama-token-counter/) · [Llama 4](https://broadrouter.com/tools/llama-4-token-counter/) · [Kimi](https://broadrouter.com/tools/kimi-token-counter/) · [Mistral Small](https://broadrouter.com/tools/mistral-token-counter/) · [Ministral 3](https://broadrouter.com/tools/ministral-token-counter/) · [gpt-oss](https://broadrouter.com/tools/gpt-oss-token-counter/) · [Phi-4](https://broadrouter.com/tools/phi-4-token-counter/) · [Gemma 3](https://broadrouter.com/tools/gemma-3-token-counter/) · [MiniMax](https://broadrouter.com/tools/minimax-token-counter/) · [Nemotron 3](https://broadrouter.com/tools/nemotron-token-counter/) · [Qwen3](https://broadrouter.com/tools/qwen3-token-counter/) · [all models](https://broadrouter.com/tools/token-counter/). Prices synced 2026-11-14.

[Report a wrong price or number](mailto:info@broadnet.ai?subject=Wrong%20price%20or%20number%20on%20GLM%20token%20counter&body=Page%3A%20https%3A%2F%2Fbroadrouter.com%2Ftools%2Fglm-token-counter%2F%0A%0AWhat%20looks%20wrong%20(model%2C%20figure%20shown%2C%20correct%20figure%20and%20a%20source%20link%20if%20you%20have%20one)%3A%0A) (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 |  |
| --- | --- |
| Tokenizer | GLM 5.3 tokenizer |
| Source | zai-org/GLM-5.3 (commit ba32f8c) |
| Token IDs | 154,856 (154,820 in the base vocabulary) |
| Context window | 1,048,576 tokens |
| Price per 1M tokens | $0.78 input · $3.46 output |
| English prose | 129 tokens per 100 words (rank 3 of 5) |
| Arabic | 244 tokens per 100 words (rank 5 of 5) |
| Python code | 200 tokens per 100 words (rank 1 of 5) |
| Download | 20 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](https://broadrouter.com/data/tokenizer-efficiency/). On Arabic the most compact was Qwen, on code GLM. Full table on the [token counter](https://broadrouter.com/tools/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](https://broadrouter.com/models/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](https://huggingface.co/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](https://broadrouter.com/tools/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](https://broadrouter.com/models/glm-5.3/) for tools and structured output.

## Go deeper

-   [GLM 5.3: price, context and setup](https://broadrouter.com/models/glm-5.3/)
-   [All-model token counter](https://broadrouter.com/tools/token-counter/)
-   [Arabic token counter](https://broadrouter.com/tools/arabic-token-counter/)
-   [Context window calculator](https://broadrouter.com/tools/context-window-calculator/)
-   [What is a token?](https://broadrouter.com/glossary/token/)

## More free tools

-   [**LLM API cost calculator**Price a workload on every model at once, with cache hits, reasoning and a flat-plan check.](https://broadrouter.com/tools/llm-api-cost-calculator/)
-   [**Speech-to-text cost calculator**Hours, calls or voice notes to a monthly transcription bill, against your current provider.](https://broadrouter.com/tools/speech-to-text-cost-calculator/)
-   [**LLM token counter**Exact token counts with each model's real tokenizer, with a token view and cost.](https://broadrouter.com/tools/token-counter/)
-   [**Arabic token counter**Arabic vs English token counts per tokenizer: the "Arabic tax" in tokens and money.](https://broadrouter.com/tools/arabic-token-counter/)
-   [**Tokens to words converter**Tokens ↔ words ↔ characters ↔ pages, by language and content type.](https://broadrouter.com/tools/tokens-to-words/)
-   [**Context window calculator**Will it fit? Window used per model, room left for output, cost to send.](https://broadrouter.com/tools/context-window-calculator/)
-   [**Flat-rate vs per-token LLM cost calculator**Break-even between an unlimited plan and paying per token, per agent.](https://broadrouter.com/tools/flat-rate-vs-per-token-calculator/)
-   [**Prompt caching savings calculator**Bill with and without caching, by prefix share and hit rate.](https://broadrouter.com/tools/prompt-caching-calculator/)
-   [**Image token calculator**Tokens and cost per image under each model's documented rule. Drop an image; nothing is uploaded.](https://broadrouter.com/tools/image-token-calculator/)
-   [**Self-hosting vs API cost calculator**GPU rental against your current API and BroadNet per-token and flat-plan prices: cost per 1M tokens and break-even volume.](https://broadrouter.com/tools/self-hosting-vs-api-calculator/)
-   [**Embedding cost calculator**Index, update and query costs for a corpus at OpenAI, Google, Voyage, Mistral and Jina list prices.](https://broadrouter.com/tools/embedding-cost-calculator/)
-   [**LLM rate limit and concurrency calculator**Which limit binds first: RPM, TPM or concurrency, with Little's law.](https://broadrouter.com/tools/llm-rate-limit-calculator/)
-   [**JSON schema generator for LLM structured output**Sample JSON to strict schema, Pydantic, Zod and a ready request.](https://broadrouter.com/tools/json-schema-generator/)
-   [**OpenAI-compatible API request builder**One request, copied as curl, Python, Node or the OpenAI SDKs.](https://broadrouter.com/tools/api-request-builder/)
-   [**Audio file splitter for speech-to-text limits**Chunk count, overlap and copy-ready ffmpeg commands to fit a transcription file-size limit.](https://broadrouter.com/tools/audio-splitter-ffmpeg/)
-   [**Agent run cost estimator**Context growth per step, total tokens and cost of one agent run, with a DeepSeek session comparison.](https://broadrouter.com/tools/agent-run-cost-estimator/)
-   [**OpenAI to BroadNet migration helper**Paste OpenAI SDK code; get base URL, key and model edits, a diff and the checks that remain.](https://broadrouter.com/tools/openai-to-broadnet-migration/)
-   [**Arabic text normalizer**Tashkeel, tatweel, alef, ya, ta marbuta, digits and invisible characters, with a matching Python function.](https://broadrouter.com/tools/arabic-text-normalizer/)
-   [**RAG chunking calculator**Chunks, embedding tokens, input per query, context check and monthly LLM cost for a RAG pipeline.](https://broadrouter.com/tools/rag-chunking-calculator/)
-   [**max\_tokens calculator for reasoning models**Answer length + reasoning budget + margin = a max\_tokens that does not cut the answer off.](https://broadrouter.com/tools/reasoning-token-budget/)
-   [**LLM batch job planner**Run time, binding limit, cost per model and the flat sessions needed to finish a big job by a deadline.](https://broadrouter.com/tools/llm-batch-job-planner/)
-   [**LLM JSON output validator**Parse errors by line and column, safe repairs, cut-off detection and JSON Schema checks for model output.](https://broadrouter.com/tools/llm-json-output-validator/)
-   [**Prompt token diff**Two prompt versions side by side: changed lines, exact token delta and the monthly cost difference.](https://broadrouter.com/tools/prompt-token-diff/)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-glm-token-counter&utm_content=page-cta) ·

**Sources**

-   [BroadNet Inference machine-readable prices (pricing.json)](https://inference.broadnet.ai/pricing.json?utm_source=broadrouter&utm_medium=referral&utm_campaign=tools-glm-token-counter&utm_content=sources)
-   [zai-org/GLM-5.3 on Hugging Face (tokenizer.json)](https://huggingface.co/zai-org/GLM-5.3)
