LocalExcelTool
Get started

Prompt Token Estimator

Paste a prompt to see its token count and what it costs as input on every major model — no login, nothing uploaded.

What is Prompt Token Estimator

Token estimation approximates how many tokens a string will consume before it reaches a model. A workable rule of thumb is roughly 4 characters per token for English and about 1 token per character for Japanese and Chinese (kanji often take 1–2), multiplied by each model's price per million input tokens. Every vendor uses a different tokenizer, so treat the result as an estimate — the authoritative number is the usage.prompt_tokens field returned by the API.

Processed in your browser only. Nothing is uploaded.

Estimated tokens

60

Characters
239
Without spaces
198
Words
42
Lines
1
CJK characters
0

What this prompt costs as input

ModelVendorInput / 1MCost for this promptRuns per $1
GPT-6 LunaOpenAI$0.1000$0.000006166,666
Claude Haiku 5.5Anthropic$0.1000$0.000006166,666
Qwen3.8-FlashAlibaba Cloud$0.1500$0.000009111,111
Gemini 3.5 Flash-LiteGoogle$0.3000$0.00001855,555
DeepSeek FlashDeepSeek$0.3000$0.00001855,555
Gemini 3.8 FlashGoogle$0.7500$0.00004522,222
GPT-6.1 TerraOpenAI$1.00$0.0000616,666
Grok 4.3xAI$1.25$0.00007513,333
DeepSeek V4 ProDeepSeek$1.32$0.00007912,626
Qwen4-MaxAlibaba Cloud$1.50$0.0000911,111
GPT-6.2 SolOpenAI$2.00$0.000128,333
Claude Sonnet 5.5Anthropic$2.00$0.000128,333
Gemini 4 CarbonGoogle$2.00$0.000128,333
Grok 4.7xAI$2.00$0.000128,333
Gemini 4 NeonGoogle$3.00$0.000185,555
Claude Opus 5.5Anthropic$4.00$0.000244,166
GPT-6.2 AstraOpenAI$8.00$0.000482,083
Claude Fable 5.2Anthropic$8.00$0.000482,083

Token counts are rule-of-thumb estimates (about 4 characters per token for English, about 1 token per character for Japanese and Chinese). Real tokenizers can differ by roughly 15%. Output tokens and cache discounts are not included.

What this tool actually does with your file

Where it runs
In your browser, on this page
Upload
None — the file never leaves your device
Offline
Works with the network disconnected

Tokens are not words, and the ratio is language-specific

Tokenisers split text into subword units from a vocabulary learned during training, so the count depends on the tokeniser, not on the text alone. As a working rule, English prose runs about 4 characters or 0.75 words per token; Chinese, Japanese and Korean run closer to 1–1.5 characters per token because most characters are their own token or a fragment of one.

That means the same paragraph costs roughly three to four times as many tokens in Chinese as in English. Budgeting a prompt in words and multiplying by a fixed factor therefore underestimates CJK cost badly — this is the single most common cause of a context limit being hit earlier than expected.

What else sits in the context window

The system prompt, tool definitions, retrieved documents, conversation history and the model's own previous replies all occupy the same budget. A request that looks like 2,000 tokens of user text can be 15,000 tokens once tool schemas and history are counted.

Output tokens are capped separately and are charged at a different rate — usually several times the input rate. Estimating only the prompt therefore underestimates cost by a wide margin on tasks with long answers, such as summarisation or code generation.

Why any browser estimate is approximate

Exact counts require the model's own tokeniser, which is a large vocabulary file specific to each model family. An estimator that ships a simplified table will be within roughly 10–20% for English and wider for code, CJK, or text heavy in numbers and punctuation.

Use the estimate for budgeting and for deciding whether a document needs chunking, and use the provider's token-counting endpoint or the usage field of a real response when the number has to be exact. The difference matters at the boundary of a limit, not in the middle of one.

How to use

  1. 1.Paste your prompt
  2. 2.Read the character count, estimated tokens and per-model input cost
  3. 3.Open the AI cost calculator when you need output tokens included

How this compares

There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.

AspectThis toolUpload-based converters
Where the file is processedIn your browser, on this pageOn the vendor's servers, after an upload
Account requiredNoUsually — free tiers ask you to sign in before lifting a limit
Size you can process for freeNo size cap, no run limitA few files per hour, or a ~5–10 MB cap before a paywall
PriceFree. Pro is $9/month, and only buys larger files and AI featuresUsually a subscription — roughly $7–15/month as of November 2026
Works offlineYes, once the page has loadedNo
Time before work starts on a 20 MB fileImmediate — there is nothing to uploadDominated by the upload — about 16 s on a 10 Mbps uplink
What it cannot preserveChecks run against what the URL returns now, not against a stored snapshotThe same — the conversion is the same maths

Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.

Frequently asked questions

How accurate is the token count?

It is an estimate. We assume about 4 characters per token for English and roughly 1 token per character for Japanese and Chinese. Real counts vary by tokenizer, typically within about 15%. For exact numbers, read usage.prompt_tokens from the API response.

Why do different models report different token counts?

Because they split text differently. A word that is one token in one tokenizer can be two in another, and the gap widens for rare words and code.

How is the price calculated?

Estimated tokens times each model's input price per million tokens. Output tokens and cache discounts are not included — use the AI cost calculator for a full per-request estimate.

Is my prompt sent anywhere?

No. Everything is computed in this page with JavaScript and nothing is transmitted, so it is safe to paste text you cannot share externally.

How do I cut tokens?

Three levers: say the same thing in fewer words, replace tables and prose with tight bullets, and cache long reference documents instead of resending them. Output tokens cost 3–5x input, so capping output length is usually the biggest saving.

What this kind of conversion cannot keep

Developer tools here check what breaks silently: a missing canonical, a description over the length search engines display, a sitemap that returns 200 but lists dead URLs. Each result links to the exact line or URL, because a warning you cannot act on is noise.

More in Developer