Free browser token counter

AI Token Calculator for OpenAI, Claude, and Gemini

Paste text to count tokens locally, estimate LLM API cost, compare provider pricing, and inspect how text is split into token-sized pieces.

Paste text to count tokens(Loading calculator...)

Your text stays in this browser.0 total characters

Token visualization

Pieces appear as the local tokenizer reads your text.

0 tokens
Paste text and the token visualization appears here.

Token summary

Tokens
0
Words
0
No-space chars
0
All chars
0

Cost snapshot

Lowest input rate
Gemini 2.5 Flash-Lite$0.1/1M
Providers covered
Major LLM APIs3 providers

Paste text to turn the pricing table into exact estimated costs for your prompt.

Need token counts in your app?

Use the Token-Calculator.net API for metered token, character, and word counts with key-based access.

POST /api/v1/tokenize$1.99/month or $9.99/year

Compare Token Costs

Compare input, cached-input, and output pricing across major LLM providers. Long-context tiers are applied automatically when your token count crosses a provider threshold.

Full model pricing table

Rates update the estimates above as soon as you paste text.

How this AI token calculator helps before an API call

A token calculator estimates the text units an LLM will process before you send a request. Token-Calculator.net counts tokens locally in the browser, converts that count into estimated input and output costs, and links model rates to official provider pricing pages.

Plan prompt budgets

Estimate token usage before sending large prompts, documents, code snippets, or JSON payloads to an LLM.

Compare provider cost

Use the same token count across OpenAI, Anthropic, and Google model pricing to see how rates differ.

Inspect token pieces

Token visualization shows how text is split, which is useful for prompts, code, punctuation, and multilingual content.

AI Token Calculator FAQ