★ GPT · token counter
GPT Token Counter
OpenAI publishes its tokenizers through tiktoken, so this page counts your text in the browser with o200k_base, the encoding behind GPT-4o through GPT-5, and highlights every token. Nothing you paste leaves your machine.
- Runs in your browser
- No signup
- 306
- Characters
- 54
- Words
- —
- Tokens / word
Tokens per word uses the o200k_base count. Characters count emoji and accented letters as one each.
Tokens
…
Counted with o200k_base, OpenAI's published tokenizer, in your browser.
Context window used
—
1.05M tokens window on GPT-6.1 Sol.
Input cost per call
—
Per 1,000 calls
—
Every model, same text
| Model | Tokens | Accuracy | Input / call |
|---|---|---|---|
| Claude Fable 5.1Anthropic | … | ≈ Estimate | — |
| Claude Opus 5.5Anthropic | … | ≈ Estimate | — |
| Claude Sonnet 5.5Anthropic | … | ≈ Estimate | — |
| Claude Haiku 5.5Anthropic | … | ≈ Estimate | — |
| GPT-6 AstraOpenAI | … | ✓ Exact | — |
| GPT-6.1 SolOpenAI | … | ✓ Exact | — |
| GPT-6 LunaOpenAI | … | ✓ Exact | — |
| Gemini 4 ArgonGoogle | 77 | ≈ Estimate | $0.00015 |
| Gemini 3.8 FlashGoogle | 77 | ≈ Estimate | $0.00006 |
| Gemini 3.1 Flash-LiteGoogle | 77 | ≈ Estimate | $0.00002 |
| Mistral Large 4Mistral | … | ≈ Estimate | — |
| Mistral Small 4Mistral | … | ≈ Estimate | — |
| DeepSeek V4.1 FlashDeepSeek | 92 | ≈ Estimate | $0.00003 |
| DeepSeek V4 ProDeepSeek | 92 | ≈ Estimate | $0.00012 |
| Llama (open weights)Meta | … | ≈ Estimate | — |
OpenAI rows use o200k_base, exact for that tokenizer. tiktoken hasn't mapped GPT-6 model names yet, so OpenAI hasn't confirmed GPT-6 uses it. Input cost is list price for your text alone, before system prompts, caching or output.
See the tokens
o200k_base
Loading the tokenizer…
Your tokens on GPT-6.1 Sol.
Prompts eating your context window? I build RAG and prompt pipelines that use a fraction of the tokens.
How GPT tokenizes
OpenAI models use byte-pair encoding (BPE): text is split into chunks from a fixed vocabulary, and common words become single tokens while rare words break into pieces. o200k_base has a vocabulary of about 200,000 tokens.
tiktoken's model table maps GPT-4o and later models up to GPT-5 to o200k_base. At the time of writing, GPT-6 model names aren't in tiktoken's table yet (see openai/tiktoken issue #608), so for GPT-6 the o200k_base count is the closest published tokenizer, not a confirmed match.
Exact or estimate?
Exact for o200k_base. The count comes from the tokenizer itself, running in your browser.
For GPT-6 models, the count is exact for o200k_base but OpenAI hasn't confirmed GPT-6 uses that encoding. Check the usage field on a real API response if you need the billed number.
Current GPT models
Context windows and input prices from the pricing data used across these tools.
| Model | Context window | Input / 1M |
|---|---|---|
| GPT-6 Astra | 1.05M tokens | $10 |
| GPT-6.1 Sol | 1.05M tokens | $2 |
| GPT-6 Luna | 1.05M tokens | $0.10 |
Quirks worth knowing
- OpenAI's rule of thumb for English is about 4 characters, or three-quarters of a word, per token. Other languages usually need more tokens per character.
- Leading spaces are part of tokens: " hello" and "hello" are different tokens.
- Chat requests add a few tokens of message framing per message, on top of your text.
Sources: OpenAI Help: What are tokens and how to count them? · OpenAI Cookbook: How to count tokens with tiktoken · openai/tiktoken issue #608: Update for gpt-6 models
Questions people actually ask
Which tokenizer does this use for GPT?
Is the count exact for GPT-6?
How many tokens is 1,000 words?
Which counts on this page are exact?
Is my text sent anywhere?
Count by model family
- Claude token counter
- Gemini token counter
- Llama token counter
- DeepSeek token counter
- Mistral token counter
Or compare every family at once on the main token counter.
More from the workbench
Fine print
Tools: on the house.
Engineer: by the hour.
Counting tokens was free. Spending fewer of them is a project.
I'm Himanshu, an AI and full-stack engineer. I build MVPs, AI agents and the growth plumbing around them for early-stage startups.
