Token Studio

Token Counter and Cost Estimation

Paste any text to see how it tokenizes across model families — with live token counts, cost estimates, and context-window usage. Everything runs locally in your browser.

Runs entirely in your browser Nothing is uploaded
Loading tokenizer…
6.4 MB · one-time
Est. cost
 
Tokens / word
 
Chars / token
 
Characters
327
58 words
Context window
Input text
327characters
270no spaces
58words
4sentences
Token breakdown
GPT-5 · o200k_base
Loading GPT tokenizer · 6.4 MB
Compare models — same text 4 of 26 · click to inspect
Model Tokens Cost
GPT-5
loading tokenizer…
—
Claude Opus
loading tokenizer…
—
Gemini Pro
loading tokenizer…
—
Muse Glimmer 30B
loading tokenizer…
—

Counts come from each model's real tokenizer, running entirely in your browser. Cost and context-window figures are estimates for guidance and may vary by model version.

What is a token?

A token is the unit that AI models understand. It could be a single character, a short chunk of characters, a word, or even a larger portion. Models like GPT-5, Claude, Gemini, or Muse Glimmer never see letters or words directly. All of them use a tokenizer, which it's a definition that splits your text into pieces from a fixed vocabulary and turns each piece into a number. Common English words usually map to a single token, while rarer words, names, code, and text in other languages split into several. Providers bill their APIs per token and measure context windows in tokens, which is why the count matters.

Why does the same text give different token counts per model?

Each model family uses its own tokenizer with its own vocabulary, so the same text splits into different token representatios per model. OpenAI's o200k_base vocabulary has about 200,000 entries. Other families made different choices. This tool runs the real tokenizer for each family directly in your browser, so the differences you see are actual splits, not estimates.

On plain English prose the spread stays small: our fixed 500-word sample ranges from 571 tokens with Grok's tokenizer to 581 with Mistral's. It widens on code, non-English text, and unusual formatting, where vocabularies differ more. Two exceptions: Anthropic and Google do not publish the tokenizers of current Claude and Gemini models, so those counts are close approximations and the tool marks them as estimates.

How does the cost estimate work?

The estimate multiplies your token count by the model's public price per million input tokens. For example, 10,000 tokens on a model priced at $1.25 per million input tokens comes to $0.0125. The estimate covers input tokens only. Model replies are billed as output tokens, usually at a higher rate. Open models show as free because you can run them on your own hardware. Prices are refreshed periodically from providers and OpenRouter, so treat the figure as guidance rather than a quote.

How many tokens is 500 words?

In our measured 500-word English sample, every family lands between 571 and 581 tokens, close to 1.15 tokens per word. The table below works as a quick word to token calculator for planning. For exact numbers, paste your own text into the token count estimator above: it runs each family's real tokenizer, so you don't have to rely on averages.

Model familyTokens for 500 wordsTokens per wordCharacters per token
GPT-5 / GPT-4o (o200k_base)5721.144.92
GPT-4 Turbo / GPT-3.5 (cl100k_base)5741.154.90
Claude (claude-v4) *5741.154.90
Gemini (gemma-3 proxy) *5781.164.87
Gemma (gemma-4)5781.164.87
Muse Glimmer (muse-glimmer-30b)5781.164.87
DeepSeek (deepseek-v4)5721.144.92
Qwen (qwen-3.6)5791.164.86
Mistral (mistral-3-4)5811.164.84
Grok (grok-2)5711.144.92
GLM (glm-4.6)5741.154.90

Measured with each family's tokenizer running in this tool, on a fixed 500-word English prose sample (2,812 characters). Ratios shift with code, other languages, and formatting. Entries marked with an asterisk use a close approximation because the maker does not publish the tokenizer.

Token counters by model

Claude token counter

Select any Claude model in the tool above to count tokens for Claude Opus, Sonnet, or Haiku. Anthropic does not publish the tokenizer for current Claude models, so the count is a close approximation and the tool marks it as an estimate. For exact numbers, Anthropic's API includes a token counting endpoint.

GPT-5 token counter

GPT-5 uses OpenAI's o200k_base encoding, and this tool runs that exact encoding in your browser. The counts match what OpenAI's own tiktoken library produces, for GPT-5 as well as GPT-4o and GPT-4.1.

Gemini token counter

Google does not publish Gemini's tokenizer. The tool uses the tokenizer of Gemma 3, Google's open model family, as a close proxy, and marks the result as an estimate. For exact numbers, the Gemini API offers a countTokens method.

Frequently asked questions

How many tokens is a word?

In English prose, one word is about 1.1 to 1.2 tokens for every model family we measured. Our fixed 500-word sample produced 571 to 581 tokens across eleven tokenizers. Short common words usually cost one token; longer or rarer words split into more pieces, so technical writing and other languages push the ratio up.

Is a token 4 characters?

Roughly, for English: OpenAI's published rule of thumb is that one token is about 4 characters. On our plain 500-word sample the measured figure came out slightly higher, between 4.8 and 4.9 characters per token depending on the family. Treat 4 characters as a rough planning figure and measure your actual text when the number matters.

Is there a public tokenizer for Claude?

Anthropic has not published the tokenizer for current Claude models, so no public tool can give exact Claude counts. This counter uses a close approximation and labels it as an estimate. When you need exact numbers, Anthropic's API provides a token counting endpoint that returns the count without running the model.

How do I count tokens for GPT-5?

Paste your text into the counter above with GPT-5 selected: it runs o200k_base, the same encoding GPT-5 uses. Nothing is uploaded; the tokenizer runs in your browser. In code, OpenAI's open source tiktoken library gives the same counts with the o200k_base encoding.