Free Tool

Token Counter

Count tokens for any prompt across GPT-4o, Claude, and Gemini — plus characters, words, and sentences. GPT counts are exact, computed by a real tokenizer right in your browser.

Instant, in-browser Your prompt never leaves your device Exact GPT tokenizer
Tokens Loading tokenizer…
0 tokens
0
Characters
0
Words
0
Sentences

Tokens across models

GPT counts are exact (real BPE tokenizer in your browser). Claude & Gemini are approximate — those providers don’t publish a public browser tokenizer. Need cost too? Try the LLM Token Cost Calculator →
Building with LLMs? We’ll architect it cost-efficiently →

We email the counts only — never your prompt text. No spam.

Shipping AI features? Parix.ai builds token-efficient LLM apps, agents & integrations.

See AI integrations →

What is a token, and why does it matter?

Large language models like GPT, Claude, and Gemini don’t read text letter by letter — they break it into tokens, which are common chunks of characters. A token is roughly ¾ of a word in English: short, frequent words are a single token, while longer or rarer words split into several. Every model has a context window measured in tokens, and every API call is billed per token — so counting them is the fastest way to predict cost and avoid “context length exceeded” errors.

How this counter works

  • GPT — exact. We run the real OpenAI byte-pair encoders in your browser: o200k_base for GPT-4o, GPT-4.1 and the o-series, and cl100k_base for GPT-4 and GPT-3.5 Turbo. The number matches what OpenAI bills.
  • Claude & Gemini — approximate. Anthropic and Google don’t publish a public in-browser tokenizer, so those counts are estimated from average characters-per-token and marked with “≈”. Use them as a close guide, not an invoice.
  • Private by design. The counting happens entirely on your device — your prompt is never uploaded. If you choose to email yourself the results, only the numbers are sent, never the text.

Tips to use fewer tokens

  1. Trim filler and repeated context; put instructions once, not in every message.
  2. Summarise long history instead of resending it on each call.
  3. Cap output length — output tokens usually cost more than input tokens.
  4. Reuse a system prompt with prompt caching where your provider supports it.
Want to turn token counts into dollars? Pair this with the LLM Token Cost Calculator to see cost per request, per month, and per year across every model.