AI & LLM
Token, cost & context tools for LLMs
OpenAI / GPT Token Counter — Exact Count (o200k Tokenizer)
This counter uses OpenAI's o200k tokenizer — the same encoding used by GPT-5.5, GPT-4o, and GPT-5.4-mini — to count tokens exactly in your browser without any server or API call. For the reference sentence "The quick brown fox jumps over the lazy dog.", the o200k tokenizer produces 11 tokens (≈ 8 words, since 1 token ≈ 0.75 words in English prose). Token counts matter for two reasons: cost (you pay per input/output token) and context fit (GPT-5.5 has a 1.1M-token window). Paste your prompt, system message, or document to get the exact o200k count before calling the API.
Sample sentence: "The quick brown fox jumps over the lazy dog."
- Token count (O200K, exact in calculator): 11
- Word equivalent (tokens × 0.75): ≈ 8 words
- GPT-5.5 context window: 1,050,000 tokens
- GPT-5.5 max output: 128,000 tokens
- Tokenizer accuracy: EXACT for OpenAI o200k/cl100k models — rates as of 2026-07-03
Frequently asked questions
How many tokens is "Hello, world!" in GPT-5.5 (o200k)?
"Hello, world!" encodes to 4 tokens in the o200k vocabulary: "Hello", ",", " world", "!". The o200k tokenizer is shared by GPT-5.5, GPT-4o, GPT-4o-mini, and GPT-5.4-mini. Older models (GPT-3.5, GPT-4-turbo) used cl100k_base (100K vocabulary) — the calculator selects the right encoding automatically when you pick a model.
Is the token count in this calculator the same as what the OpenAI API charges?
Yes — for OpenAI models (o200k and cl100k encodings), this calculator runs the actual tiktoken-compatible tokenizer (via gpt-tokenizer) directly in your browser, producing the same token count the API uses for billing. For Anthropic Claude and Google Gemini — whose tokenizers are proprietary and not publicly released — the count is a calibrated estimate (chars ÷ 3.5 and chars ÷ 3.8 respectively). Data as of 2026-07-03.