Tokens are the unit language models actually read and bill for, so counting them answers two practical questions before you send a prompt: will it fit the model’s context window, and what will it cost? You can check both in the token counter without an API key.
The quick answer
Paste your text into the token counter, pick a model, and read the token count. It also shows words, characters, how much of the context window you are using, and an editable cost estimate. Everything runs in your browser.
What is a token?
A token is a chunk of text: a short word, part of a longer word, a punctuation mark, or a space. As a rule of thumb, one token is about four characters or three quarters of a word in English. So 1,000 words land around 1,300 to 1,500 tokens. That ratio shifts for code, unusual words and other languages, which is why an actual count beats a guess.
Why token count matters
Context windows. Every model can only hold so many tokens of input and output combined. If your prompt plus the expected reply is larger than the window, the request fails or gets truncated. Counting first tells you whether you need to trim the prompt or switch to a model with a bigger window.
Cost. APIs bill per token, and input and output are priced separately, with output usually several times more expensive. Counting the input and estimating the output lets you predict the bill per request and multiply it out across your usage.
How GPT, Claude and Gemini differ
The same sentence does not produce the same token count on every model, because each family tokenizes text with its own scheme. OpenAI’s newer models use one tokenizer, its older ones another, and Anthropic and Google each use their own. Newer versions within a family can also shift counts.
In practice the numbers are close across models, but not identical. Treat a cross-model count as a good estimate and count against the specific model you plan to call when the exact figure matters for cost or context limits.
Estimating cost from a token count
Once you have a token count, cost is simple arithmetic:
input cost = input tokens ÷ 1,000,000 × input price per 1M
output cost = output tokens ÷ 1,000,000 × output price per 1M
The tool fills in a starting price for each model, but those rates are editable estimates. Providers change pricing, and batching or prompt caching can cut it substantially, so confirm the current rate on the provider’s official pricing page before you rely on a number.
A few ways to spend fewer tokens
- Trim boilerplate and repeated instructions from long system prompts.
- Send only the context the model needs, not an entire document, when a summary will do.
- Remember that output is the expensive half, so asking for concise answers saves more than trimming input.
When you are wrangling API payloads alongside prompts, the Base64 encoder, JSON formatter and hash generator are handy next stops. If you just need word and character counts for writing rather than tokens, the word counter is the better tool.