LLM Token Counter
Estimate how many tokens your prompt uses in GPT-4, GPT-4o, o1/o3 and Claude — with character ratios and context limit capacity checks.
| Model context limit | Token count | Fit percentage |
|---|
🔒 Runs entirely in your browser — nothing you type is uploaded or stored on a server.
The LLM Token Counter estimates how many tokens your text, prompt or document will consume across major AI model architectures. Paste any text to see an estimated token count, the character-to-token ratio, and how much of each model's context window it would fill.
Also on Txtset: count standard words and reading stats · measure exact character limits.
Large language models do not process whole words or single characters; they process tokens (fragments of words and punctuation). This page estimates rather than tokenizes: it applies a ratio calibrated per model family — one for the cl100k family (GPT-4, GPT-3.5-Turbo) and a slightly denser one for o200k (GPT-4o, o1, o3-mini) — instead of downloading a multi-megabyte vocabulary into your browser. On ordinary English prose it lands within roughly 10-15% of the real count; heavy code, tables or non-Latin scripts drift further.
If you need an exact number — for a billing estimate or a prompt that sits right on a context limit — use OpenAI's tiktoken library or Anthropic's count-tokens API endpoint. What this page is for is the everyday question of whether a draft is anywhere near a limit, answered instantly and without sending your text anywhere. A context limit table shows what percentage of each model window (from 8k to 200k tokens) your input would fill.
How to use
- Select the model family you are writing for: GPT-4 / 3.5, GPT-4o / o-series, or Claude.
- Paste your prompt, code, system message or document into the text box.
- Read the estimated token total, the character count, and the characters-per-token ratio.
- Check the Context Limit table to see how much of each model's memory window is used.
Examples
Paste a 500-word prompt to see that it costs roughly 650-700 tokens in GPT-4 — close enough to know it fits.
o200k (GPT-4o) packs text more densely than cl100k, so the same prompt is estimated a little cheaper there.
Check whether a 50,000-character document fits comfortably inside a 128k context model.
Estimate token totals before submitting large batches of text to commercial LLM APIs.