LLM Token Counter

Count tokens for GPT, Claude and Gemini as you type. Your prompts never leave your device.

Your text is tokenized locally in your browser and never uploaded, but avoid pasting secrets or production data you would not want on your own machine's clipboard.

Know your token count? Estimate the API cost.

About Token Counter

This token counter shows how many tokens your text uses across the major language models, updating live as you type or paste. OpenAI counts are exact because it runs the same tokenizers OpenAI ships — o200k_base for GPT-4o, GPT-4.1 and the o-series, and cl100k_base for GPT-3.5 Turbo and GPT-4. Claude is estimated with a subword tokenizer (o200k_base) and Gemini at roughly four characters per token — Anthropic and Google don't publish a browser tokenizer, so both are approximate for current models and clearly labelled. Alongside tokens you also get characters, words and a tokens-per-character ratio, which is handy for staying inside a context window or estimating prompt cost. Everything is tokenized locally in your browser, so the prompts you paste are processed on your device and never leave it.

Features

How to use the Token Counter

  1. Paste or type your prompt into the text box.
  2. Read the live token counts for OpenAI o200k, OpenAI cl100k, Claude and Gemini.
  3. Check the exact and approx badges to see which counts are precise.
  4. Use the characters, words and tokens-per-character stats to gauge context usage.
  5. Click Copy summary to grab every count at once.

Example

Input

Summarize this article in three bullet points.

Output

OpenAI o200k: 10 tokens (exact)
OpenAI cl100k: 10 tokens (exact)
Claude: 10 tokens (approx)
Gemini: 12 tokens (approx)

OpenAI counts are exact; Claude and Gemini are approximate estimates.

Common errors & troubleshooting

Frequently asked questions

Are the OpenAI token counts exact?
Yes. The counter uses the same byte-pair tokenizers OpenAI ships — o200k_base for GPT-4o, GPT-4.1 and the o-series, and cl100k_base for GPT-3.5 Turbo and GPT-4 — so those counts match what the OpenAI API charges.
Why are the Claude and Gemini counts marked approximate?
Current Claude and Gemini models tokenize on the provider's servers and do not expose an exact browser tokenizer. Claude is estimated with a subword tokenizer and Gemini uses a ~4-characters-per-token heuristic, so both are labelled approx.
What is the difference between o200k and cl100k tokens?
They are two OpenAI encodings. o200k_base is used by GPT-4o, GPT-4.1 and the o-series; cl100k_base is used by GPT-3.5 Turbo and GPT-4. They tokenize the same text slightly differently, which is why the counts can differ.
How many characters are in a token?
For English text it averages roughly four characters per token, but it varies with punctuation, whitespace, code and other languages. The tokens-per-character stat shows the real ratio for your exact input.
Is my prompt sent to OpenAI, Anthropic or Google?
No. All tokenization runs locally in your browser using bundled tokenizers, so the text you paste is processed on your device and is never uploaded to any model provider or to ArrayKit.

Related tools

All ArrayKit tools