Text & data
Count tokens
Paste a prompt or a document and see the exact token count — from the real tokenizer, not a characters-divided-by-four guess. The table underneath says whether it fits. Your text is never uploaded.
Save and continue on the desktop
Download or copy your result here first. Open the free desktop to save to Files or use more features.
- Simple notes with bold and lists — saved locally
- Save to Files when you continue on the desktop
- Every tool in one place — no new tabs
After you download — continue on the desktop for Files or the full app.
What Token Counter can do
Exact where exact is possible, marked where it is not
OpenAI publishes its tokenizers, so the count for GPT-5, GPT-4.1, GPT-4o and the older GPT-4 and 3.5 models is exact — the same byte-pair vocabulary the API uses, running here. Nobody else publishes one. So the Claude, Gemini and Llama rows are marked with ≈ and counted with OpenAI’s vocabulary standing in for theirs, which lands within a few per cent on ordinary prose. Most token counters print those numbers with no mark at all, and that is the difference between an estimate and a claim.
Why "characters ÷ 4" keeps letting you down
The rule of thumb is calibrated on English prose and nothing else. A tokenizer works on byte pairs, so a common English word is one token, an uncommon one is three, and Russian, Greek, Hebrew or Thai often cost a token per character or worse — the same paragraph can be twice the tokens in one language and half in another. Code, JSON and long URLs break it in the other direction. If you are near a limit, the difference between the rule of thumb and the real number is exactly the part that decides whether the call goes through.
The vocabulary downloads once, and nothing else leaves
The tokenizer is about a megabyte and is fetched the first time you type, then cached — so the character and word counts show instantly while it lands, and the next visit is immediate. Your text is not part of that: it is tokenized here, in this tab, and never sent anywhere. That is the whole reason to count locally rather than pasting a confidential prompt into somebody’s server to have it measured.
Related apps
Questions
Is my text uploaded anywhere?
No. The tokenizer runs in your browser, on this device. The text is never sent to a server, and we never see it.
Which tokenizer does it use?
o200k_base for GPT-5, GPT-4.1 and GPT-4o, and cl100k_base for GPT-4 Turbo, GPT-3.5 and OpenAI embeddings — the same vocabularies those models use.
Are the Claude and Gemini numbers exact?
No, and they are marked ≈ for that reason. Neither vendor publishes a tokenizer, so those rows count with OpenAI’s vocabulary as a stand-in. On ordinary prose it lands within a few per cent; treat a text that sits exactly on the limit as risky.
Why does the number take a moment the first time?
Because the vocabulary itself is about a megabyte and is fetched once, then cached by your browser. Characters and words are counted immediately, without downloading anything.
Does it count tokens for code and JSON?
Yes — it is the same tokenizer either way, and code is exactly where the characters-over-four rule of thumb is furthest off.