Skip to main content
KPZsProductions

Free online tools

Token counter and LLM cost

Paste a text and the tool counts its tokens with the exact o200k_base tokenizer, then shows what it would cost to send it to a model or to have a model generate it.

Tokens
…
Characters
0
Words
0
ModelCost as inputCost as reply
GPT-5 nano……
GPT-5.4……
Claude Sonnet……
Gemini Pro……

Prices in USD per 1 million tokens, approximate. Check the provider's price list before budgeting.

OpenAI tokenizer (o200k_base). For Claude and Gemini the count is approximate.

Your data never leaves your browser. Nothing is sent to a server.

How to use it

  1. Paste or type your text into the field.
  2. Read the number of tokens, characters and words.
  3. Compare the cost of that text as input and as a model reply.
  4. Shorten the prompt or pick a cheaper model if the cost is too high.

What a token is

A token is a piece of text a model splits its input into: a word, part of a word or a punctuation mark. In languages with rich inflection a word usually takes more tokens than in English, so the same meaning costs more.

How accurate the result is

For OpenAI models from the GPT-4o family onwards the count is exact, because we use the same tokenizer. Claude and Gemini split text differently, so for them treat the number as an approximation with an error of a few percent to over ten percent.

Input and output are priced differently

Providers charge separately for tokens sent to the model and tokens it generates, and the reply is usually several times more expensive. That is why the table has two columns. Prices are approximate and change, so check the provider's price list before budgeting.

Frequently asked questions

Need more than a tool?

If there is a bigger project behind it, a website, a shop or an app, describe it in a short brief. We reply with specifics and no obligation.

Describe your project

Newsletter

Subscribe to the newsletter

Concrete lessons from our projects, new case studies and practical tips on web apps and automation. No spam.

By subscribing, you accept the privacy policy.

We use essential cookies to run the site and, with your consent, optional PostHog analytics. Cookie Policy