APIMaster.ai

Free Token Counter for AI Prompts

Count text tokens locally with o200k_base or cl100k_base, estimate Claude and Gemini tokens, and calculate input cost using your own price.

Runs in your browser. Your text is not uploaded.

Check a prompt before sending it to an API. Compare tokenizer counts, inspect text length, and estimate input spend without uploading your text.

Up to 50,000 UTF-16 units per count (some emoji use two units).

Runs in your browser. Your text is not uploaded.

—Tokens
0Characters
0Whitespace-separated words

Exact text tokens for the selected encoding

Estimated input cost

—

Based on your entered price and this text only. No model price is implied.

Counts cover the pasted text only. Chat wrappers, tools, images, output and provider billing can add tokens. Claude and Gemini estimates are approximate; check the provider usage response for actual billed tokens.

How it works

  1. Paste text, code, or JSON into the counter.
  2. Choose a tokenizer. Use the clearly labeled estimates only for rough Claude or Gemini planning.
  3. Enter your input price per million tokens to estimate the cost of the pasted text.

Questions & answers

Is this the exact number I will be billed?

The o200k_base and cl100k_base options count text with those encodings. Billing depends on the actual model and full request, including messages, tools and media. Claude and Gemini options are rough estimates, not their official tokenizers.

Does counting tokens use an API or upload my text?

No. The tokenizer runs locally in your browser. Counting is free and does not consume API credits.

Choose the right API for your budget

Compare live model prices, create an account and get an API key. Check the actual usage returned by your selected model when estimating production costs.

More free AI tools