AI & LLM
Token, cost & context tools for LLMs
LLM Token Counter
Count the tokens in a prompt for each model (OpenAI exact, Claude/Gemini estimated) — plus words, characters, live cost and context-fit, all in your browser. Accurate, instant and free — for United States.
Tokenized entirely in your browser — nothing is sent to a server.
~4 tokens for GPT-5.5 · est. cost $0.00002 · fits the context window. Exact count is computed in your browser below.
GPT-5.5 tokens
4
estimated · ~4 chars/token
Input cost (this prompt)
$0.00002
at $5.00 / 1M input tokens
Context window
4 / 1,050,000 tokens
Fits — using 0.000% of the window, leaving 1,049,996 tokens for the model to work with.
How tokens are counted — and turned into words
Large language models don’t read characters or words — they read tokens, subword pieces produced by a byte-pair encoding (BPE) tokenizer. Common words are a single token; longer or technical words split into 2–4 pieces. This counter runs OpenAI’s exact tokenizer in your browser and estimates Claude and Gemini, then folds in a words and characters view.
OpenAI (exact)
tiktoken o200k / cl100k
o200k → GPT-4o, GPT-5.x; cl100k → GPT-3.5, GPT-4.
The real BPE runs in-page (WASM) — same count the API bills.
Claude / Gemini (estimated)
Proprietary tokenizers
Anthropic and Google don’t publish their tokenizers.
Calibrated estimate: Claude ≈ chars ÷ 3.5, Gemini ≈ chars ÷ 3.8 (±10–15% on English).
Tokens ↔ words
1 token ≈ 0.75 words
words ≈ tokens × 0.75
1 word ≈ 1.33 tokens. Dense code / non-Latin scripts run higher.
- 1The exact count comes from the tokenizer, not a rule of thumb: "Hello, world!" = 4 tokens in o200k — the pieces are
Hello,,,world,!. The 4-chars-per-token rule would guess ~3; the in-browser tokenizer gives the billed answer. - 2Turn tokens into cost and a context-fit check: Once you have the token count, the LLM API Cost Calculator prices it per model, and the Context Window Checker tells you whether the prompt fits with output budget reserved.
Your prompt never leaves the browser
Exact for OpenAI, estimated for Claude and Gemini — and why
Only OpenAI publishes its tokenizer (tiktoken), so only OpenAI counts can be exact. Anthropic and Google keep theirs proprietary, so Claude and Gemini counts are calibrated estimates — good enough to plan cost and context, but not billed-to-the-token. The tool never hides which is which.
For tight context decisions, add a safety margin
Frequently asked questions
With OpenAI’s o200k tokenizer (used by GPT-4o and GPT-5.x), "Hello, world!" encodes to exactly 4 tokens: "Hello", ",", " world", "!". The count comes from running the real tiktoken byte-pair encoder in your browser — the same tokens the OpenAI API bills you for. As a rough guide, 1 token ≈ 4 characters ≈ 0.75 words in English prose, so this 13-character string lands at about 3–4 tokens.
For OpenAI models it is exact — the calculator runs the tiktoken-compatible tokenizer (o200k for GPT-4o/GPT-5.x, cl100k for GPT-3.5/GPT-4) in your browser, matching the API’s billed count. For Claude and Gemini the count is estimated (their tokenizers are proprietary) — typically within ±10–15% for English text. Each count is labelled EXACT or ESTIMATED. To turn tokens into a bill, see the LLM API Cost Calculator.
About 750 words for GPT-family models — the standard conversion is 1 token ≈ 0.75 words, or equivalently 1 word ≈ 1.33 tokens. So a 1,000-word essay is roughly 1,333 tokens, and a 1M-token context window holds around 750,000 words. The ratio shifts for dense code, JSON, or non-Latin scripts, which use more tokens per word than plain English.
No. The tokenizer runs entirely in your browser as WebAssembly — your prompt, system message, or document is never sent to any server or API. That is the point of a client-side counter: you can safely measure proprietary or sensitive prompts without them leaving your device.
Chat completion APIs add a few tokens per message for role markers and formatting (the "system"/"user"/"assistant" scaffolding), so a multi-message conversation costs slightly more than the sum of the raw message texts. For a single block of text the raw count is accurate; for chat calls, add a small per-message overhead. Image, audio, and video inputs are counted differently again and are not covered by this text tokenizer.
Method, assumptions & references
Methodology: OpenAI counts run the tiktoken-compatible BPE tokenizer in-browser (o200k for GPT-4o/GPT-5.x, cl100k for GPT-3.5/GPT-4) and match the API’s billed count. Claude/Gemini tokenizers are proprietary — counts are calibrated estimates (≈ chars ÷ 3.5 and ÷ 3.8), labelled ESTIMATED. Words ≈ tokens × 0.75. Worked example engine-exact: "Hello, world!" = 4 tokens (o200k). Chat APIs add per-message overhead; the raw count understates chat-call tokens. Nothing you paste leaves the browser.
Cross-links
How we calculate this
Reviewed by Reckonist Editorial · Last reviewed 24 June 2026. Figures follow the methods and sources set out in our editorial standards.
OpenAI token counts are exact (in-browser tiktoken) and match the API’s billed count; Claude and Gemini counts are calibrated estimates because those tokenizers are proprietary — add a 10–15% margin for tight context decisions. Model list and pricing are as of the review date and change with new releases. Chat API calls add per-message overhead beyond the raw text count.
Keep going
Same-category tools follow this colour; a cross-category link keeps its own.