The plain-English definition

A token is the smallest unit of text a language model reads and writes. When you send a prompt, the model does not see words or characters; it sees a sequence of tokens. When it replies, it generates tokens one at a time. Providers bill you per token, so the token is also the unit of cost.

How tokenizers split text

A tokenizer is the algorithm that turns raw text into tokens. Most modern models use a variant of byte-pair encoding (BPE), which learns a vocabulary of common character sequences. Frequent words become a single token; rare or long words are broken into smaller pieces. OpenAI models use a tokenizer called o200k, which this site runs exactly in your browser.

A sentence split into tokens The phrase "unbelievable cost" split so "unbelievable" becomes three tokens and the short words are one token each. un believ able cost ? “unbelievable cost?” becomes five tokens
Long or rare words split into multiple tokens; short common words are one token each.

Why tokens are not words

It is tempting to treat tokens and words as the same, but they diverge quickly. The word “unbelievable” is several tokens, while “the” is one. Punctuation, spaces, numbers and emoji all count. Structured text like JSON spends tokens on braces, quotes and repeated keys. This is why a word count is a poor proxy for cost and a token count is the reliable one.

Why token count matters

Token count decides three practical things: whether your prompt fits the model’s context window, how much the request costs, and how fast it responds. Sizing a prompt by words can overflow a context window or blow a budget without warning. Measuring tokens first avoids both.

See your own text

Paste any text below for an exact GPT token count, a token visualization, and a labeled estimate for other models.

0tokens (est.)
0words
0characters
0chars, no spaces

Token count uses the exact GPT (o200k) tokenizer. Counted in your browser, never uploaded.

Models
Qwen3.8 MaxDeepSeek V4 FlashClaude Opus 5
ModelTokensPer requestMonthlyContext
Qwen3.8 Max0 est.$0.003$3.000.1%
DeepSeek V4 Flashcheapest0 est.$0.00014$0.140.1%
Claude Opus 50 est.$0.013$12.500.1%

Token counts vary by tokenizer and model; non-OpenAI counts are estimates. Cost is an estimate and provider pricing can change. See each model's source on the pricing page.