Token Counter
1,000 characters come to about 400 tokens by Anthropic's documented ratio of 2.5 characters per token, and about 250 by Google's ratio of 4 characters per token. Paste your own text for an exact OpenAI count.
How to use
- Paste or type your text. Nothing leaves your browser.
- Pick the OpenAI encoding. o200k_base fits GPT-4o, GPT-4.1, GPT-5 and the o-series, cl100k_base fits GPT-4 and GPT-3.5.
- Read the exact token count, plus the characters, words and lines. Claude and Gemini rows are estimates.
How it works
OpenAI: the text is split with the real byte-pair-encoding tables published in the open-source tiktoken project, run in your browser through the js-tiktoken port. The count is exact for the chosen encoding. The table files (about 2 MB) load only when you first type, not with the page.
Which encoding a model uses comes from the tiktoken project's model list: o200k_base for gpt-4o, gpt-4.1, gpt-5, o1, o3 and o4-mini, and cl100k_base for gpt-4 and gpt-3.5-turbo. Models newer than that list have no published tokenizer name in the docs we checked, so treat the o200k_base count as a reference for them.
Claude and Gemini have no public tokenizer, so those rows are estimates. Claude: Anthropic's model overview says 1M tokens is roughly 555k words or 2.5M Unicode characters on its current tokenizer, so the estimate is characters ÷ 2.5 and words ÷ 0.555. Gemini: Google says a token is about 4 characters and 100 tokens are about 60 to 80 English words, so the estimate is characters ÷ 4 and words × 100/80 to 100/60.
The headline estimate is the larger of the values, which is the safe side when checking whether a text fits a limit. The range in brackets runs from the smallest to the largest method.
FAQ
What is a token?
The unit a language model reads and writes. Tokenizers split text into pieces that can be whole words, parts of words, single characters or punctuation. The same sentence can have a different token count in a different model.
How accurate is the count?
The OpenAI count is exact for the encoding you pick, because it uses the same tables as tiktoken. It counts the text only: the extra tokens a chat API adds around messages are not included. Claude and Gemini counts are estimates from document ratios written for English text, so they can be off, more so for Korean, Japanese, code or numbers.
How do I get an exact Claude or Gemini count?
Use the providers' own counters. Anthropic offers a free token counting endpoint (POST /v1/messages/count_tokens), which its docs also call an estimate. Google's Gemini API has countTokens. Anthropic notes that Claude 4.7 and later models produce about 30 percent more tokens for the same text than earlier ones, so count against the model you plan to use.
Why are the OpenAI encodings different?
cl100k_base is the older vocabulary and o200k_base the newer, larger one. Which one a model uses follows the tiktoken model list. The same text often gets fewer tokens in o200k_base.
Is my text sent anywhere?
No. Counting runs in your browser. The tokenizer table is downloaded from this site once, and your text is never uploaded.