Skip to the counter
TokenCraftby

Token counter & LLM cost calculator

Exact counts for GPT models, clearly marked estimates for 76 others, and what the call costs at today's rates. Counted in your browser; your text is never uploaded.

Your prompt

Paste or drop a file. Nothing you type leaves this tab.

0 chars0 words0 BLoading the tokenizer…

The rate board

Every model, priced for the prompt in your editor: 0 tokens in, 0 out. Bars sit on one fixed log scale from $0.003 to $100 per million, so a short bar is cheap on every row. Click a model to make it your pick.

Model prices per million tokens and the cost of the current call, sorted by call
—
—
—
—
—
—
—
—
—
—
—
—
—
—
—

≈ marks models with their own tokenizer; their counts are o200k_base estimates. Prices are list rates in USD and exclude batch discounts.

Pay for words, not whitespace

Prompts copied from editors and docs carry indentation, comments and padding that the model reads and you pay for. The minifier strips that formatting and leaves your wording alone. It counts the result with the same tokenizer, so the saving it shows is in tokens, not characters.

  • Comments in code blocks// notes and /* blocks */ the model never needed
  • Repeated spaces and blank lineseach run becomes one
  • Trailing spacestrimmed from every line
  • JSON indentationonly when the JSON parses, so data is never damaged
  • Markdown table paddingthe alignment spaces between pipes

On the prompt in your editor

Counting…

Counter and price list, in one place

Tokenizer playgrounds show you the tokens but not what they cost. Price calculators ask you to type a token count you do not know yet. TokenCraft reads the prompt itself and answers both questions. “Varies” means some tools in that group do it and many do not.

How TokenCraft compares with tokenizer playgrounds and price calculators
What you getTokenCraftTokenizer playgroundsPrice calculators
Token boundaries drawn on your own textUnderlined in place while you edit, not in a separate pane.YesYesNo
Says which counts are exact and which are estimatesEvery non-OpenAI model carries an ≈ Estimate stamp.YesVariesNo
Live prices for 90+ modelsFetched from OpenRouter on load; snapshot refreshed weekly.YesNoVaries
Cheapest model for this exact promptRanked by full call cost, reply included, among models it fits.YesNoVaries
Context fit including the reply you expectPrompt and reserved reply shown against the window, plus price-tier warnings.YesNoVaries
Minifier with savings counted in tokensRe-tokenizes the result instead of guessing from characters.YesNoNo
Text never leaves the browserCounting runs in a Web Worker; only prices come over the network.YesVariesVaries

Made by Nor AI

TokenCraft is a free tool from Nor AI Technologies, an engineering studio in Ghazipur, Uttar Pradesh. We build custom AI, web and 3D software that runs in your own infrastructure, and you keep the code.

Pricing an LLM feature for real traffic, or deciding which model a pipeline should run on? Bring the numbers from the rate board and talk to the engineers who would build it.

Tokens, plainly

Every model price is quoted per million tokens, so knowing how your text turns into tokens is the whole game. Here is what matters, without the hype.

What a token is

A model never sees letters or words. A tokenizer first cuts your text into pieces from a fixed vocabulary and turns each piece into a number. Common words are usually one piece, often with the space in front of them. Rare words, names and numbers break into several. Emoji and many non-Latin characters can take more than one token each, because the vocabulary is built from bytes.

That is why the editor above underlines each token in place. Look at a long URL or a block of JSON and you can see the cost pile up.

Why counts differ by model

Each lab trains its own vocabulary. OpenAI publishes theirs, so TokenCraft runs it exactly and marks those models Exact. Anthropic, Google, Meta, Mistral, DeepSeek and others use tokenizers that are not all public, so their counts here are estimates made with o200k_base and marked ≈ Estimate.

Treat estimates as a planning figure. Some newer tokenizers produce noticeably more tokens than o200k_base for the same text, so leave headroom near a context limit and check your provider's usage report for the billed number.

cl100k_base vs o200k_base

cl100k_base has about 100,000 entries and arrived with GPT-4; the text-embedding-3 models still use it. o200k_base doubled the vocabulary with GPT-4o and is used by newer GPT models. A bigger vocabulary means longer pieces, so the same text usually needs fewer tokens, and the difference is largest outside English. Here are both, counted on your device:

Token counts for the same text in cl100k_base and o200k_base
Same text incl100k_baseo200k_baseChange
English………
Code………
Hindi………
Counted just now in your browser. The Hindi line is a translation of the English one.

Four ways to cut the bill

  1. Cache the stable part. Put instructions and reference material first and keep them identical between calls. Providers that offer prompt caching bill repeated prefixes at a much lower rate; the answer panel shows that rate when the model has one.
  2. Ask for shorter replies. Output usually costs several times more per token than input. Set the reply size in the answer panel and watch which side of the bill moves.
  3. Strip formatting. Indentation, comments and table padding are tokens too. The minifier removes them and shows the real saving.
  4. Pick the model per job. The rate board ranks every model for your exact prompt. A cheaper model that fits often does routine work just as well.

How TokenCraft prices a call

Cost per call is input tokens times the input rate, plus the expected reply times the output rate. Rates are list prices in US dollars from OpenRouter's public catalog. They do not include batch discounts, regional pricing or taxes. When a model charges more above a certain prompt length, the answer panel warns you once your prompt crosses it.

Questions people ask

About accuracy, prices and what happens to your text.