Token Counter: Count Tokens for GPT, Claude, Gemini
Paste text and get an estimated token count and input cost for 16 models from OpenAI, Anthropic, Google, DeepSeek, xAI and Meta, side by side.
Know your tokens before you spend them
Every LLM bills by the token, and every model family uses a slightly different tokenizer. Our token counter estimates the count for each family: it measures how much of your text is Latin, CJK, Cyrillic, Arabic, Devanagari or Thai script, digits or URLs, then applies a characters-per-token ratio for that tokenizer family. These are heuristics, with no guaranteed error margin; use the model provider tokenizer for an exact count.
Beyond the counts, it shows the input cost for each model at the per-million prices written into the tool, and a short profile of your text so you can see why two texts of the same length count differently.
Features
Estimated token counts for GPT-5.4, o3, o4-mini, Claude Opus 4.6, Sonnet 4.6, Haiku 4.5, Gemini 2.5, DeepSeek, Grok and Llama 4
Input cost per model, at per-million prices dated March 2026
A text profile: characters, words, lines, script, and whether it reads as prose, Markdown, code or a mix
URLs and digits counted separately, since they tokenize differently
All 16 models compared in one table
Copy the whole report in one click
Use it to compare what the same text costs across models, to spot text that tokenizes badly, and to size inputs before you send them.
How it works
Paste your text into the counter
Click Count
The text is profiled in your browser: scripts, content type, URLs, digits
See estimated token counts and input costs for 16 models in one table
Copy the report
Use cases
Estimate whether a long document is small enough to paste into a chat
Estimate the input cost of the same text across providers
See how much URLs, numbers or code weigh in a prompt
Compare GPT vs Claude vs Gemini cost for the same input
Right-size chunk parameters before embedding
Audit a prompt library for bloat
Frequently asked questions
Are the counts exact?
No, they are estimates. No real tokenizer runs in the browser: the counter applies a characters-per-token ratio per script and per tokenizer family, and there is no guaranteed error margin.
Are the prices live?
No. They are per-million input prices written into the tool, dated March 2026, and the report says so. There is no field for your own rates.
Does it work offline?
The counting runs in your browser and your text is not sent anywhere. The tool still needs a connection to check your credits before counting.
Can I count multiple files at once?
No. It counts the text pasted into the box.
Does it support chat format?
It counts whatever you paste, chat exports included, as plain text. It does not add the per-message overhead that chat models count on top.
Which Claude tokenizer is used?
None runs in the browser. Claude counts are estimated with a ratio for Anthropic’s tokenizer family, like every other model in the table.