# Token Counter – Count Tokens Online for GPT-5, GPT-4o, GPT-4

> Free online token counter. Paste text to count tokens with OpenAI's official tiktoken encodings (o200k_base, cl100k_base) right in your browser, see exactly…

Source: https://gaodong.ai/en/tools/token-counter

---

# Token counter

LLMs bill by tokens and measure context in tokens. Paste some text to see how many tokens it has and how a model splits it.

## How to use it

1. Pick a tokenizer: `o200k_base` is used by GPT-5, GPT-4.1, GPT-4o, o1 and o3; `cl100k_base` by GPT-4 and GPT-3.5 Turbo (from the model table in OpenAI's tiktoken source).
2. Paste text; the count updates as you type.
3. Tick "Show how the text is split" to color every token. English, Chinese, code and whitespace split very differently.
4. Click "Price this many input tokens" to open the [AI API cost calculator](/en/tools/api-cost) with your count.

Counting happens in your browser; your text is never sent anywhere. The tokenizer (about 2 MB) loads once from jsDelivr.

## FAQ

### Are counts the same for Claude, Gemini or DeepSeek?

No. Each vendor uses its own tokenizer, so counts differ. This tool is exact for OpenAI models; for others, treat it as a ballpark and rely on the usage numbers their APIs return.

### How do tokens relate to context length?

A model's context window is the maximum number of tokens it can handle at once. See which models fit your text in the [context window lookup](/en/tools/context-length).
