How many tokens does your prompt have?

Quickly estimate token counts for Claude, GPT and Gemini — all models side by side, with context window check.

{{ stats.chars }} {{ __t('chars') }} · {{ stats.words }} {{ __t('words') }} · {{ stats.lines }} {{ __t('lines') }} · {{ stats.bytes }} {{ __t('bytes') }}

{{ __t('tokens_per_model') }}
{{ m.name }}
{{ estimateTokens(m).toLocaleString() }}
{{ m.note }}
{{ __t('note_label') }}: {{ __t('disclaimer') }}
{{ __t('context_check') }}
{{ __t('th_model') }} {{ __t('th_tokens') }} {{ __t('th_context') }} {{ __t('th_usage') }} {{ __t('th_status') }}
{{ row.name }} {{ row.tokens.toLocaleString() }} {{ row.context.toLocaleString() }} {{ row.pct.toFixed(1) }}% {{ __t('status_ok') }} {{ __t('status_tight') }} {{ __t('status_over') }}

What are tokens?

Tokens are the building blocks an LLM breaks text into before processing it. A token is usually a word fragment — for English text roughly 4 characters or ¾ of a word; for Chinese/Japanese often 1–2 tokens per character. Tokens drive both cost (billed per million tokens) and capacity (context window in tokens).

Why do counts differ between models?

Each provider trains their own tokenizer on a specific corpus. GPT-4o uses o200k_base (~200k vocab), older GPT cl100k_base (100k). Claude and Gemini have their own tokenizers with different subword splits. The same "internationalization" can be split into 4, 6 or more tokens depending on the tokenizer. Differences are largest for non-Latin scripts (Arabic, Thai, CJK).

Practical tips

  • Rule of thumb: 1 token ≈ 4 chars English, 3 chars German, 1–2 tokens per CJK character.
  • Code and JSON often use more tokens due to special characters — compact notation can save.
  • Long system prompts: enable prompt caching — saves up to 90% of input cost.