AI Token Counter
- Characters
- 0
- Words
- 0
- Estimated tokens
- 0
- Words per token
- —
| Model family | Est. tokens | Input $ / 1M | Output $ / 1M | Est. input cost |
|---|---|---|---|---|
| GPT-3.5 / GPT-4 (OpenAI)Price based on GPT-4o | 0 | $2.50 | $10.00 | $0 |
| Claude (Anthropic)Price based on Claude Sonnet | 0 | $3.00 | $15.00 | $0 |
| Llama (Meta)Price based on Llama 3.x, typical host | 0 | $0.60 | $0.60 | $0 |
| Gemini (Google)Price based on Gemini Flash | 0 | $0.10 | $0.40 | $0 |
Type or paste text to see estimated token counts and costs.
These are approximate estimates from a character and word heuristic, not exact tokenizer output. Real counts vary by model and tokenizer, usually within about 10 to 20 percent. Pricing is representative public list pricing that changes over time, so check the provider for current rates. Everything runs in your browser.
Paste any prompt, document, or snippet of code to get a quick estimate of how many tokens it will use across the major model families: GPT, Claude, Llama, and Gemini. It also shows the character count, word count, the rough words per token ratio, and an approximate input cost from each family's pricing. The estimate uses a character and word heuristic, so it is fast and approximate rather than an exact tokenizer. Everything runs in your browser.
How to use
- Paste or type your text into the box.
- Read the total characters, words, and estimated tokens at the top.
- Compare the estimated tokens per model family in the table.
- Check the approximate input cost for each family from its pricing.
- Trim your prompt and watch the estimate update live.
Examples
- About 4 characters of English count as 1 token, so 1,000 characters is roughly 250 tokens.
- Code packs denser, closer to 3 characters per token, so the same length of code uses more tokens than prose.
- Non-Latin scripts like Chinese or Japanese often use about 2 characters per token, sometimes one token per character.
FAQs
- How accurate is the token estimate?
- It is a heuristic, not exact. Real tokenizers split text using a learned vocabulary, which needs the model's tokenizer files. This tool uses the well known rule of about 4 characters per token for English, with denser ratios for code and non-Latin scripts. For most prompts it lands within about 10 to 20 percent of the true count, which is enough to size a prompt or estimate cost.
- Why do GPT, Claude, Llama, and Gemini show different numbers?
- Each family uses a different tokenizer, so the same text splits into a slightly different number of tokens. The tool applies a small per family adjustment to the baseline estimate to reflect that. They are still estimates, so treat the differences as approximate.
- How is the cost calculated?
- It multiplies the estimated tokens by a representative input price per million tokens for a common model in each family. The table also lists the output price, since replies are billed separately. Pricing changes over time and varies by exact model and provider, so check the provider for current rates.
- What counts as a token?
- A token is a chunk of text a model reads, often a short word or part of a word. A rough guide is about 0.75 words per token in English, so 100 tokens is roughly 75 words. Punctuation, spaces, and rare words can each take their own token.
- Does my text get uploaded?
- No. The text is analyzed locally in your browser. Nothing is uploaded or stored, so it is safe to paste private prompts.
Related tools
- Word CounterCount words, characters, sentences, paragraphs, and reading time for any text. Live, private, and free in your browser.
- Case ConverterConvert text between UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, and kebab-case instantly in your browser.
- JSON FormatterFormat, validate, and beautify JSON in your browser. Paste messy JSON, get clean indented output, then copy it back. Free, no signup.
- Base64 EncoderEncode text to Base64 or decode Base64 back to text in your browser. Full UTF-8 support and clear errors on invalid input.
- URL EncoderPercent encode and decode text for URLs in your browser. Toggle direction, copy results, and see clear errors on malformed input.
- HTML Entity EncoderEncode special characters to HTML entities or decode them back. Handles ampersand, less than, greater than, and quotes with a direction toggle.