Token Counter

Paste any text to count its tokens. OpenAI tokens are counted exactly with the o200k_base tokenizer, in your browser; Claude and Gemini are estimated at about 4 characters per token. You also see what the text costs on every current model — prices checked 2026-10-02.

OpenAI tokens
0
o200k_base, counted in your browser
Claude / Gemini (est.)
≈ 0
characters ÷ 4
Words
0
Characters
0

What this text costs on each model

ModelTokensSend as inputGenerate as output× 1,000 calls (input)
GPT-6 Astra0$0$0$0
Claude Fable 5.1≈ 0*$0$0$0
Claude Opus 5≈ 0*$0$0$0
Claude Opus 5.5≈ 0*$0$0$0
GPT-6 Sol0$0$0$0
Gemini 3.1 Pro≈ 0$0$0$0
Claude Sonnet 5≈ 0*$0$0$0
Claude Haiku 4.5≈ 0$0$0$0
Gemini 3.8 Flash≈ 0$0$0$0
Gemini 3.5 Flash-Lite≈ 0$0$0$0
GPT-6 Luna0$0$0$0

OpenAI counts use o200k_base, the encoding OpenAI publishes for GPT-4o through GPT-5.x; GPT-6's tokenizer is not public, so its rows use the same count. Claude and Gemini counts are estimates (characters ÷ 4). *Claude Opus 4.7 and later use a tokenizer Anthropic says produces about 30% more tokens than earlier Claude models. For exact counts use Anthropic's count_tokens or Google's count_tokens API. Your text never leaves your browser.

What is a token?

A token is the unit an AI model reads and writes — usually a word, part of a word, or a punctuation mark. "Cat" is one token; a longer word like "tokenization" is split into pieces. Providers bill per token, and every model's context window is measured in tokens, so the token count decides both what a prompt costs and whether it fits. More on how tokens work →

How counting differs by provider

ProviderPublic tokenizer?How this page countsExact count
OpenAI (GPT)Yes — tiktoken (o200k_base for GPT-4o through GPT-5.x)Exact, with o200k_base in your browsertiktoken
Anthropic (Claude)NoEstimate: characters ÷ 4count_tokens API (free)
Google (Gemini)NoEstimate: characters ÷ 4count_tokens method

Tokens per word and character

Rules of thumb for English text. Code and non-English text usually use more tokens.

1 token≈ 4 characters ≈ ¾ of an English word
100 tokens≈ 75 words (Google: 60–80 words)
1,000 tokens≈ 750 words ≈ 1.5 pages
1 line of code≈ 10 tokens
1 million tokens≈ 750,000 words ≈ 8 novels

Need to go the other way? Use the tokens to words converter.

Frequently asked questions

How do I count tokens for ChatGPT and the OpenAI API?
Paste your text into the counter above. It counts tokens with o200k_base, the encoding OpenAI publishes in its tiktoken library for GPT-4o through GPT-5.x, and runs entirely in your browser. OpenAI has not published a separate tokenizer for GPT-6, so treat GPT-6 counts from any third-party tool as an approximation.
Can I count Claude tokens exactly?
Not in the browser — Anthropic doesn't publish its tokenizer. Use Anthropic's free count_tokens API endpoint for exact numbers. As a rough guide, Anthropic says one token is about 4 characters or 0.75 English words, and Claude Opus 4.7 and later models produce about 30% more tokens than earlier Claude models for the same text.
How many tokens is a Gemini prompt?
Google says a Gemini token is about 4 characters, and 100 tokens is about 60–80 English words. For an exact count, call the Gemini API's count_tokens method.
Why do different models count the same text differently?
Each provider trains its own tokenizer with its own vocabulary, so the same sentence splits into different pieces. Code, non-English text, numbers and unusual words usually take more tokens than plain English prose.
Is my text sent to a server?
No. Counting happens in your browser. The only network request is loading the tokenizer file itself and the latest model prices.