Paste your prompt
Use a single field or split system + user messages. Upload a .txt/.md file or load the sample.
Loading tool…
100% browser · no uploads
AI · Free tool
Count tokens for GPT, Claude, Gemini, Llama, and more before you hit the API. Exact OpenAI tokenization, clear estimates for other providers, context meters, and side-by-side cost compare — all on your device.
Important: OpenAI counts use the official tokenizer encodings in your browser. Anthropic, Google, and other providers are labeled estimates. List prices are for planning only — verify billing with each provider.
Loading tokenizer…
Context window
119 / 128,000
0.09% input · 0.48% with output reserve · 127,381 tokens left
Tokens
119
Estimate
Characters
476
Words
80
Tokens / word
1.49
List prices as of June 2026, per 1M tokens. Not a billing quote — verify with your provider.
Tap a row to select that model. Remaining tokens subtract input and your expected output reserve.
03 steps
Use a single field or split system + user messages. Upload a .txt/.md file or load the sample.
See exact or estimated tokens, context usage, and tokens left after reserving output space.
Scan every model in one table, then copy a summary or download a CSV for clients and tickets.
Large language models do not read characters the way humans do. They split text into tokens — whole words, subwords, or single characters depending on the tokenizer. “ChatGPT” might be one or two tokens; a rare name might be many.
Counting tokens before an API call helps you stay inside the context window, leave room for the model’s reply, and forecast spend.
OpenAI models in this tool use the same families of encodings as tiktoken (o200k / cl100k) loaded in your browser — those counts are marked Exact once the tokenizer finishes loading.
Claude, Gemini, Llama, and similar providers ship their own vocabularies. We estimate from an OpenAI base count with a small provider factor and label those rows Estimate so you never confuse them with billing quotes.
The context window is the combined budget for system instructions, history, tools, your prompt, and the model’s completion. Filling 90% of the window with input leaves little room for a useful answer.
Use the expected-output field to reserve reply space. The remaining tokens figure subtracts both your input and that reserve from the model’s window.
Most providers bill input and output separately per million tokens. A short prompt with a long reply can cost more than a long prompt with a terse reply.
The compare table uses public list prices for planning. Volume discounts, batch APIs, cached prompts, and fine-tuned endpoints change real invoices — treat this as a relative ranking, not a quote.
Put durable instructions in a system message and keep the user turn focused on the task. Deduplicate pasted docs, strip boilerplate HTML, and prefer bullet summaries over full pages when the model only needs the gist.
For RAG, count retrieval chunks separately from the question so you know when to shrink top-k or chunk size.
Draft in Split mode, confirm context headroom on your production model, compare cheaper alternatives in the table, then copy the summary into the ticket or PR so the team sees the budget.
08 answers on file
No. Tokenization and cost math run entirely in your browser. Nothing is sent to our servers for counting.
Yes for the OpenAI models listed — we use gpt-tokenizer encodings (o200k / cl100k) locally. Counts show as Exact after the tokenizer loads.
Those providers use different tokenizers. We apply a calibrated factor on top of an OpenAI base count and label the result so it is never confused with an official bill.
No. It uses published list prices for planning. Confirm current rates, tiers, and discounts with each provider.
It reserves reply tokens when estimating cost and remaining context so you do not fill the window with input alone.
Yes. Switch to Split mode to edit system and user panes; the tool combines them for the model count.
Yes. Download a CSV of every model’s tokens, context %, and estimated costs, or copy a plain-text summary for the selected model.
Yes. No signup and no API key required for counting.
No. Tokenization and cost math run entirely in your browser. Nothing is sent to our servers for counting.
Toolkit
9 live utilities — SEO, schema, JSON, email preview, photo geotagging, and more. Same privacy-first approach: most tools run entirely in your browser.