About AI Prompt Token Counter
Count the exact number of tokens in your prompt for OpenAI models before you send it, so you can stay within context limits and estimate cost. Runs entirely in your browser using the same tiktoken encodings OpenAI uses.
How to Use
- Paste or type your prompt.
- Pick the model / encoding (o200k for GPT-4o, cl100k for GPT-4 / GPT-3.5).
- See the live token count, plus characters and words.
- Trim your prompt to fit the context window or budget.
Why Use This Tool?
- Accurate — built on precise, well-tested mathematical formulas.
- Instant — all calculations happen client-side for zero latency.
- Private — no data is sent to any server; your information stays on your device.
- Free — no sign-up, no limits, no hidden costs.
Frequently Asked Questions
What is a token?
A token is a chunk of text the model reads — roughly 4 characters or about ¾ of a word in English. Models are billed and context-limited by tokens, not words, so 1,000 words is usually around 1,300–1,500 tokens.
Is this accurate for GPT-4o and GPT-4?
Yes. It uses the real tiktoken encodings — o200k_base for GPT-4o / GPT-4.1 / o1 / o3, and cl100k_base for GPT-4, GPT-4 Turbo, and GPT-3.5 — so the count matches what OpenAI charges.
Does it work for Claude or Gemini?
Those providers use their own tokenizers, which aren't published, so this tool can't count them exactly. The number is a close approximation — expect it to be in the same ballpark.
Is my prompt sent anywhere?
No. Tokenisation happens entirely in your browser, so your prompt is never uploaded — safe for confidential or proprietary text.