Token Counter

Paste any text to get an exact OpenAI token count for GPT-5, GPT-4o and GPT-4, plus Claude and Gemini estimates. Everything runs in your browser. Nothing is uploaded.

Exact
0
Tokens
0
Characters
0
Words
Chars / token

Exact — o200k_base tokenizer for GPT-5, GPT-4o, GPT-4.1 and the o-series.

Runs in your browser. Nothing is uploaded.

Frequently asked

What is a token?

A token is the unit language models actually read. Text is split into sub-word pieces by a tokenizer, and each piece is one token. As a rough guide, one token is about four characters of English, but code, numbers and other languages tokenize very differently.

Is this token count exact?

Yes, for OpenAI models. This tool runs the real tiktoken encodings (o200k_base for GPT-5, GPT-4o and the o-series, cl100k_base for GPT-4 and GPT-3.5) directly in your browser, so the count matches what the API bills.

What about Claude and Gemini?

Claude and Gemini are supported as estimates. Their tokenizers are not openly available for exact browser-side counting, so Claude is approximated from tiktoken (it usually runs 15 to 20 percent higher for English) and Gemini uses Google's guidance of roughly 4 characters per token. For exact numbers, use Anthropic's or Google's count-tokens APIs.

Is my text sent anywhere?

No. The tokenizer runs entirely in your browser. Your text never leaves your device.