DeepSeek token counter
Updated
In short: This counter runs the tokenizer.json published in the deepseek-ai/DeepSeek-V4.1-Flash repository, so the count matches what the model reads. It has 129,280 token IDs and is a 2 MB download. English prose takes about 127 tokens per 100 words; Arabic takes about 222.
tokens
| Model | Tokens | Chars per token | As input | As output |
|---|---|---|---|---|
| DeepSeek V4.1 Flash DeepSeek V4.1 Flash tokenizer | … | … | … | … |
| GLM 5.3 GLM 5.3 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.
Other counters: GLM · 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
- Paste text into the box or pick a sample. The DeepSeek V4.1 Flash tokenizer is preselected and downloads once (2 MB) when you start.
- The text appears split into tokens, a colour per token; tick "Show token IDs" to see the numbers.
- Tick "Chat format" to include the system prompt and chat-template tokens a request adds.
- Compare the table with the other models and copy the link or download CSV.
About the DeepSeek tokenizer
DeepSeek V4.1 Flash keeps the byte-level BPE design of earlier DeepSeek models, with a 128,000-token learned vocabulary plus 1,280 added and special tokens. It splits numbers into groups of up to three digits and keeps runs of Chinese and Japanese characters together before merging, which is why it is efficient on Chinese text (112 tokens per 100 words in our dataset).
It is weaker on Arabic and Hindi than the larger multilingual vocabularies: Modern Standard Arabic sentences need 1.62× the tokens of their English translations. Because it is the smallest download of the four (2 MB), it loads in a second or two on most connections.
| Tokenizer | DeepSeek V4.1 Flash tokenizer |
|---|---|
| Source | deepseek-ai/DeepSeek-V4.1-Flash (commit 314113f) |
| Token IDs | 129,280 (128,000 in the base vocabulary) |
| Context window | 1,048,576 tokens |
| Price per 1M tokens | $0.175 input · $0.52 output |
| English prose | 127 tokens per 100 words (rank 2 of 5) |
| Arabic | 222 tokens per 100 words (rank 4 of 5) |
| Python code | 211 tokens per 100 words (rank 3 of 5) |
| Download | 2 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,000Worked example
The English sample in the counter is 260 words. The DeepSeek V4.1 Flash tokenizer splits it into 299 tokens. Sent to DeepSeek V4.1 Flash as a prompt it costs $0.000052; written by the model as an answer it costs $0.00016. Prices are per one million tokens, so multiply the count by the price and divide by 1,000,000.
Questions
Which tokenizer does DeepSeek V4.1 Flash use?
A byte-level BPE tokenizer with 129,280 token IDs, published as tokenizer.json in the deepseek-ai/DeepSeek-V4.1-Flash repository. This page loads that exact file, pinned to commit 314113f.
Can I count DeepSeek tokens with tiktoken?
No. tiktoken implements OpenAI's encodings, which have a different vocabulary. On our dataset texts GPT's o200k_base differs from DeepSeek by up to 44% on the same text. Use DeepSeek's own tokenizer, as this page does, or read usage.prompt_tokens from the API.
How many tokens does a DeepSeek chat request add?
With the official chat template's defaults, a single user message adds about 30 tokens: the begin-of-sentence token, the System, User and Assistant markers, a reasoning-effort line and the opening think tag. A system prompt adds only its own text. Tick "Chat format" above to see them.
How much text fits in DeepSeek V4.1 Flash's context?
1,048,576 tokens, prompt and answer together. At about 127 tokens per 100 English words that is roughly 825.65 thousand words. Check a real document with the context window calculator.
What does a DeepSeek prompt cost?
On BroadNet, DeepSeek V4.1 Flash is $0.175 per 1M input tokens and $0.52 per 1M output tokens. A 1,000-word English prompt is about 1,270 tokens, or $0.00022. It is also sold on flat unlimited plans with no token meter.