Free tool · no signup

LLM Token Counter

Count tokens in any text with a real GPT tokenizer (o200k), plus a cost estimate across models. Useful for fitting prompts into context windows and budgeting API spend. Runs entirely in your browser.

GPT tokens (o200k)

Characters

0

Words

0

Lines

0

Estimated cost as input

ModelTokensInput cost
Claude Fable 5approx0$0.00000
Claude Opus 4.8approx0$0.00000
Claude Sonnet 4.6approx0$0.00000
Claude Haiku 4.5approx0$0.00000
GPT-5.50$0.00000
GPT-5.40$0.00000
GPT-4.10$0.00000
GPT-4.1 mini0$0.00000
GPT-4.1 nano0$0.00000
Gemini 2.5 Proapprox0$0.00000
Gemini 2.5 Flashapprox0$0.00000

GPT counts use OpenAI’s real o200k_base tokenizer and are exact for GPT-4.1/5-class models. Anthropic and Google don’t publish a browser tokenizer, so their counts are a documented ~4-chars-per-token approximation (marked approx) — for exact Claude counts use the count_tokens API. Nothing you type leaves your browser.

This LLM token counter counts the tokens in any text using OpenAI’s real o200k tokenizer, plus a cost estimate across models. It’s useful for fitting prompts into a context window and budgeting API spend. Everything runs in your browser — nothing you paste is uploaded.

Because models price and limit usage by tokens rather than words, an accurate token count is the only reliable way to predict cost and avoid hitting context limits.

What is a token?

A token is the unit a language model reads and generates. In English it’s roughly three-quarters of a word, or about four characters. Common words are a single token; rarer words, code and punctuation split into several. So 1,000 words is usually around 1,300 tokens.

Why token counts matter

Every API charges per token and every model has a maximum context window measured in tokens. Counting tokens before you send a request tells you whether your prompt will fit, how much the call will cost, and how much room is left for the response.

Exact vs approximate counts

The GPT figure here is exact — it uses the same o200k_base tokenizer that GPT-4.1 and GPT-5-class models use. Anthropic and Google don’t publish a browser tokenizer, so their counts are shown as a clearly-labelled four-characters-per-token estimate. For an exact Claude count, use Anthropic’s count_tokens API.

Related

Want the work done, not just the tool?

OpenHelm runs AI agents in a secure cloud environment to do the actual task — research, outreach, reporting, monitoring — and hands back the result for your sign-off.

More free tools

Frequently asked questions