>_
TOK

LLM Token Counter

Count tokens exactly with OpenAI’s o200k_base (GPT-4o, GPT-4.1, GPT-5, o-series) and cl100k_base (GPT-4, GPT-3.5) tokenizers, and see how your text is split. Runs offline in your browser.

Runs locally — your input never leaves this page.

Tokenizer
Tokens
–
Characters
–
Words
–
Lines
–
Chars / token
–

Counts are exact for OpenAI models. Claude, Gemini, DeepSeek and Qwen use their own tokenizers — treat this as an estimate for them.

How to use

  1. Paste your prompt, document or chat transcript.
  2. Choose the tokenizer: o200k_base for current OpenAI models, or cl100k_base for GPT-4 and GPT-3.5.
  3. See the token, character and word counts update live, and turn on the visualizer to see exactly where tokens are split.

FAQ

Is the count accurate for Claude, Gemini, DeepSeek or Qwen?

No tool outside the vendor can be exact for those models: each uses its own tokenizer, and Anthropic and Google do not publish theirs for offline use. The OpenAI count is a reasonable ballpark (often within 10–30%), but use the vendor’s token-counting API when you need exact numbers.

Why does Chinese text use more tokens?

Tokenizers are trained mostly on English, so common English words are often a single token while CJK characters may take one or more tokens each. Newer tokenizers like o200k_base are noticeably more efficient for Chinese than cl100k_base.

Is my text uploaded?

No. The tokenizer (the open-source gpt-tokenizer library) is downloaded once and runs entirely in your browser.

Report a bug or suggest a feature →