Free tool

Universal token counter

Paste any text. See token counts for GPT, Claude, and Gemini side by side — plus characters and words. Fully client-side, nothing leaves your browser.

OpenAI (GPT-5, 4.x)

~0

approx until tokenizer loads

Claude

~0

approx (±10%)

Gemini

~0

approx (±10%)

Characters

0

Words

0

What is a token?

A token is the unit an LLM actually sees. The models don't read your characters — a tokenizer splits your text into chunks (usually 2-5 characters each for English, sometimes a whole word, sometimes a half-syllable), and the model processes those chunks.

Every provider uses a different tokenizer. OpenAI's o200k_base (used by GPT-4o, GPT-4.1, GPT-5) and cl100k_base (older GPTs) are open-source; Anthropic's Claude and Google's Gemini each ship proprietary tokenizers that are only accessible via their APIs. That's why this tool shows exact counts for OpenAI and approximations for the other two.

As a rule of thumb, 1 token ≈ 4 English characters ≈ ¾ of a word. But this breaks down for code (3 chars/token), emoji (1-4 tokens each), and non-English scripts (often 2-3× more tokens per char).

How tokens relate to characters

TextCharacters~Tokens
Hello51
Hello, world!134
The quick brown fox jumps over the lazy dog.4411
function add(a, b) { return a + b; }3613
pneumonoultramicroscopicsilicovolcanoconiosis4511
🎉🚀✨ emoji counts are surprising3012

Frequently asked

Why do OpenAI, Claude, and Gemini give different token counts?

Each provider trains its own tokenizer on its own corpus with its own vocabulary size (OpenAI's o200k_base has ~200K tokens, older cl100k_base has ~100K, Claude and Gemini are proprietary but comparable). Different vocabularies produce different splits; a word that's one token for one model might be two or three for another.

Is the OpenAI count exact?

Yes — it uses the official js-tiktoken library with the o200k_base encoding, which is the same encoding every GPT-4o / GPT-4.1 / GPT-5 model uses. Counts match the OpenAI API exactly.

Why are Claude and Gemini counts approximate?

Neither Anthropic nor Google ship an offline tokenizer; the only way to get an exact count is to call their API, which would require a roundtrip on every keystroke. We use a character-based approximation (chars ÷ 4) that's accurate to within ±10% for typical English prose.

Is my text sent anywhere?

No. The counter runs entirely in your browser. OpenAI counting uses js-tiktoken which encodes locally; Claude and Gemini use a pure-JavaScript heuristic. Nothing is uploaded.

How do I use this for cost estimation?

Multiply the token count by the model's per-token price (e.g. $2.50/1M input for GPT-5, so 1,000 tokens = $0.0025). The /estimator and /calculator pages do this math automatically across every model.

Know the tokens? Get the cost.

Once you've got a token count, the estimator turns it into an exact dollar forecast across every model.