Text
Free Token Counter
Count GPT tokens in your text for API cost estimation.
0
Tokens (est.)
0
Words
0
Characters
About this tool
If you are building anything with large language model APIs - OpenAI, Anthropic, Google - you are paying per token. But most people have no idea how many tokens their prompt or input text actually contains until they get the bill. This tool gives you a quick, reliable estimate before you send a single API call.
Tokens are not the same as words. A token is roughly 3-4 characters of English text, and common words like "the" or "is" are usually a single token, while longer or less common words might be split into multiple tokens. Punctuation, special characters, and formatting all count too. This means a 500-word blog post might be anywhere from 600 to 800 tokens depending on the vocabulary used.
The token estimate here uses an approximation algorithm that closely matches the behavior of OpenAI cl100k_base tokenizer (used by GPT-4 and GPT-3.5 Turbo). It is not a byte-pair encoding implementation - for that you would need tiktoken - but for cost estimation and planning purposes, it gets you within 5-10% of the actual count, which is more than enough for most use cases.
We also show estimated API costs across popular models so you can compare pricing before committing to a provider. All processing happens in your browser - your text is never sent anywhere.
Frequently Asked Questions
The estimate is within 5-10% of the actual token count for typical English text. For exact counts, use the official tiktoken library from OpenAI.
A token is a chunk of text that language models process. In English, one token is roughly 3-4 characters or about 0.75 words. Common words are single tokens, while rare or long words may be split into multiple tokens.
More capable models (like GPT-4) require more compute to run, so they cost more per token. Smaller, faster models (like GPT-3.5 Turbo or Claude Haiku) are significantly cheaper.
No. Token counting happens entirely in your browser. Nothing you type here is stored, logged, or transmitted.
