---
title: "GPT token counter (o200k) vs open models | BroadRouter"
description: "Count GPT tokens with OpenAI's o200k_base encoding in your browser, and compare the count with DeepSeek, Qwen, GLM and Gemma tokenizers on the same text."
url: https://broadrouter.com/tools/gpt-token-counter/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# GPT token counter

Updated 2026-11-15

**In short:** This counter uses o200k\_base, the encoding OpenAI's tiktoken uses for GPT-4o, GPT-4.1, the o-series and GPT-5 models, via the gpt-tokenizer library. It has 200,019 token IDs. The table puts the same text through DeepSeek, Qwen, GLM and Gemma tokenizers for comparison.

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 forGPT (o200k) — OpenAI o200k\_baseDeepSeek V4.1 Flash — DeepSeek V4.1 Flash tokenizerGLM 5.3 — GLM 5.3 tokenizerQwen3.8 27B — Qwen3.8 27B tokenizerGemma 4 VL 26B — Gemma 4 tokenizer (Google base model) Show token IDs Show spaces

Tokens and cost of this text per model
| Model | Tokens | Chars per token | As input | As output |
| --- | --- | --- | --- | --- |
| **GPT (o200k)** · OpenAI o200k\_base | … | … | … | … |
| **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) | … | … | … | … |

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-gpt-token-counter&utm_content=tool) ·

Other counters: [DeepSeek](https://broadrouter.com/tools/deepseek-token-counter/) · [GLM](https://broadrouter.com/tools/glm-token-counter/) · [Qwen](https://broadrouter.com/tools/qwen-token-counter/) · [Gemma](https://broadrouter.com/tools/gemma-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%20GPT%20token%20counter&body=Page%3A%20https%3A%2F%2Fbroadrouter.com%2Ftools%2Fgpt-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 OpenAI o200k\_base is preselected and downloads once (1.1 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 GPT tokenizer

o200k\_base is a byte-level BPE encoding with 199,998 merge ranks plus special tokens. It replaced cl100k\_base (GPT-4 and GPT-3.5) and is far better on non-English text. The counter uses gpt-tokenizer, which we checked gives the same token IDs as OpenAI's tiktoken on every sample on this page.

BroadNet does not sell GPT models, so this page shows no GPT price. It is here so you can see how a GPT-based estimate compares with the tokenizer of the open model you may move to: on our Modern Standard Arabic texts o200k needs 189 tokens per 100 words against 222 for DeepSeek V4.1 Flash.

| GPT tokenizer facts |  |
| --- | --- |
| Tokenizer | OpenAI o200k\_base |
| Source | o200k\_base via gpt-tokenizer |
| Token IDs | 200,019 (199,998 in the base vocabulary) |
| English prose | 127 tokens per 100 words (rank 1 of 5) |
| Arabic | 189 tokens per 100 words (rank 2 of 5) |
| Python code | 203 tokens per 100 words (rank 2 of 5) |
| Download | 1.1 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/).

## Questions

### Which GPT models use o200k\_base?

GPT-4o, GPT-4o mini, GPT-4.1, the o1, o3 and o4 reasoning models and the GPT-5 family, according to the model maps in tiktoken and gpt-tokenizer. GPT-4 and GPT-3.5 Turbo used the older cl100k\_base.

### Does this count match OpenAI's tokenizer?

For plain text, yes: we checked gpt-tokenizer against tiktoken on every sample here and the token IDs were identical. For chat requests OpenAI does not publish its exact format; the counter adds the cookbook rule of about 4 tokens per message plus 3 for the reply.

### Can I use a GPT token count to estimate DeepSeek or Qwen costs?

Only roughly. On English the counts are close, but on our dataset texts they differ by up to 33% against Qwen and more on Arabic and Hindi against some models. Load the real tokenizers in the table to see the exact gap for your text.

### How many words is 1,000 GPT tokens?

About 787.402 English words by our measurement (1183 words = 1501 tokens). Other languages and code differ; see the [tokens to words converter](https://broadrouter.com/tools/tokens-to-words/).

### What is the cheapest BroadNet model for my text?

Load all tokenizers in the table: the input and output columns price your exact text on each BroadNet model. For a whole workload, use the [LLM API cost calculator](https://broadrouter.com/tools/llm-api-cost-calculator/).

## Go deeper

-   [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-gpt-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-gpt-token-counter&utm_content=sources)
-   [gpt-tokenizer (o200k\_base)](https://github.com/niieani/gpt-tokenizer)
-   [OpenAI cookbook: counting tokens with tiktoken](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken)
