LLM token counter & cost estimator
Paste your prompt to count tokens and estimate cost across models. Exact for GPT, with live prices and context limits that update themselves, plus a context budget bar, all in your browser.
Model & cost
Files are processed in your browser and never uploaded.
How to use LLM token counter & cost estimator
Add your text
Type or paste your text into the input box. Everything is handled by your own browser, so nothing is sent to a server.
Set the options
Choose Model (type to search). The options are visible from the start, not hidden until you paste something.
Run it and keep a copy
Press Advanced options ▾ to produce the result. Copy summary puts the result on your clipboard.
What this tool does
Exact GPT token counts, approximate for other models
GPT models are counted exactly with the real tokenizer. Other models are approximated, and the page says which you are getting.
Live, auto-updating prices and context windows
Prices and context windows update themselves, so a cost estimate does not quietly go stale when a model is repriced.
Input, output and total cost for any model
Input, output and total cost are worked out for the model you pick, with your own rates if you have negotiated different ones.
Context window budget bar
The context budget bar shows how much of the model's window your prompt uses, which is the limit people hit first.
Token breakdown view for advanced use
The token breakdown shows the text split into the actual tokens, which is how you find out why a short prompt costs so much.
Runs in your browser, nothing uploaded
The text is tokenised in your browser, so a prompt you have not shipped yet is never uploaded.
Frequently asked questions
Is my text uploaded anywhere?
No. Your text is tokenised and counted entirely in your browser and is never sent anywhere. The only network request is to fetch the public price list, which contains no text of yours.
How accurate are the token counts?
For GPT models the count is exact, using the real OpenAI tokenizers. Claude, Gemini and other providers have no public tokenizer, so those counts are approximate, calculated with the GPT-4o tokenizer as a close proxy and clearly labelled as such.
Where do the prices and limits come from, and are they current?
They are fetched live from LiteLLM's open, community-maintained dataset, which is updated very frequently and often on the day new models launch. Nothing needs manual updating. If it is ever unavailable you can type your own rate in the advanced options.
What does the context window bar show?
It compares your input tokens, plus any expected output tokens, against the selected model's maximum context window, so you can see how much room is left before you hit the limit.
Does it still work without the live pricing?
Yes. Token counting works on its own once the tokeniser loads. For cost, if live pricing has not loaded you can enter a custom input and output rate in the advanced options and the totals update normally.
Last updated: