AI Token Counter
Paste any text to count its tokens for GPT, Claude and Gemini. It all runs in your browser, so your text never leaves your device.
0 characters0 words
… tokens
OpenAI's o200k_base tokenizer
… tokens
Anthropic's current tokenizer
… tokens
Anthropic's previous tokenizer
≈ 0 tokens
Google's rule: 1 token ≈ 4 characters
Words to tokens (and back)
No text to paste? Enter a length and see roughly how many tokens it is on each model.
| Model | Tokens |
|---|---|
| GPT-5.x, GPT-4.1, GPT-4o, o-series | 1,342Our measured rate |
| Claude Opus 5, Sonnet 5, Fable, Opus 4.7+ | ≈ 2,0131,812–2,214 |
| Claude Haiku 4.5, Sonnet 4.6, Opus 4.6 | ≈ 1,4091,268–1,550 |
| Gemini | ≈ 1,4291,250–1,667 |
For English prose. Code, numbers and most other languages use more tokens per word.
What a token counter tells you
A token counter tells you how many tokens a piece of text uses, and tokens are what AI models read, limit and bill by. Paste your text above and you get the exact count for OpenAI’s GPT models, plus estimates for Claude and Gemini, whose tokenizers aren’t public. We checked the GPT count against OpenAI’s own tokenizer library on English, code, JSON, Urdu, emoji and five full articles, and it matched every time. From our own measurements, 1,000 English words come to about 1,340 GPT tokens and roughly 2,000 tokens on Claude’s newer models. That gap is real money: the same prompt can cost more, or fill a context window sooner, on one model than on another. And your text never leaves your browser.
What each number means
Only the GPT number is exact. The Claude and Gemini numbers are careful estimates, and each card says which one you’re looking at.
- GPT (exact). Counted with
o200k_base, the tokenizer OpenAI’s tiktoken library uses for GPT-4o, GPT-4.1, the o-series and GPT-5. Public tokenizer libraries map GPT-5.6 to it as well. OpenAI hasn’t published GPT-6 Astra’s tokenizer, so treat a GPT-6 count as very close rather than guaranteed. - Claude (estimate). Anthropic doesn’t publish Claude’s tokenizer, and the only exact count comes from its token counting API. We start from the exact GPT count and scale it: about 1.5 times for Claude Opus 4.7 and everything after it (Opus 4.8, Opus 5, Sonnet 5, Fable), and about 1.05 times for older models like Haiku 4.5 and Sonnet 4.6. The range under each estimate is 10% either side.
- Gemini (estimate). Google’s Gemini documentation says a token is about four characters, so that’s the rule we use. It’s a rule for English: code and most other languages come out higher.
- Characters and words. Characters are counted the way you see them, so an emoji counts once. Words are anything between spaces with a letter or number in it, the same way a word processor counts.
The count covers the text itself. A real API request adds a few tokens per message for formatting, plus your system prompt, tool definitions and images. The reply is billed separately as output tokens, which cost more than input on all three.
Why Claude counts more tokens for the same text
Claude Opus 4.7 brought in a new tokenizer that cuts text into smaller pieces. Anthropic says the same text now produces approximately 30 percent more tokens than on earlier Claude models. Its models overview puts it in words: 1M tokens holds about 555,000 words on the new tokenizer, against about 750,000 before.
Independent tests with Anthropic’s own counting API found bigger jumps on plain text. Simon Willison measured 1.46 times as many tokens on a long system prompt going from Opus 4.6 to 4.7. TextKit measured 1.88 tokens per word on English for Opus 4.8, against 1.17 for GPT-5. Our 1.5 ratio sits between those results.
This changes how you should compare prices. Claude Opus 5 costs $5 per million input tokens, but if a prompt takes 1.5 times as many Claude tokens, that works out closer to $7.50 per million GPT tokens of the same text. So compare what the same prompt costs, not the price per token. Our AI API cost calculator does that for you, tokenizer differences included. More tokens also fill Claude’s context window sooner and eat into your Claude plan’s usage limits faster.
Tokens to words: what we measured
On our own articles, 1,000 words came to 1,342 GPT tokens. We ran this page’s counting code over all 46 articles on PublorAI, 101,758 words in total, on September 19, 2026. Single articles ranged from 1.20 to 1.56 tokens per word.
| Text we counted | GPT tokens | What that works out to |
|---|---|---|
| 46 English articles (101,758 words) | 136,542 | 1.34 tokens per word, 4.5 characters per token |
| The same articles on GPT-4’s older tokenizer | 138,575 | 1.5% more than GPT-4o and later |
| TypeScript code (58 files from this site) | 42,315 | 26 tokens per 100 characters |
| JSON data files (3 files) | 6,169 | 32 tokens per 100 characters |
| Two Urdu sentences (19 words) | 30 | 17 for the same sentences in English, 85 on GPT-4’s tokenizer |
Three things stand out. Our articles use more tokens per word than plain English because they’re full of model names, prices and version numbers: “GPT-5.5 costs $20/month” is 3 words but 9 tokens. Code and JSON are far denser, since brackets, quotes and indentation all take tokens. And Urdu takes about 1.8 times as many tokens as the same sentences in English, even though GPT-4o’s tokenizer already cut Urdu to about a third of what GPT-4 needed.
Some quick conversions you can use:
- 1,000 words ≈ 1,340 GPT tokens, or about 2,000 on Claude Opus 4.7 and later (1,800 to 2,200).
- 1 million GPT tokens ≈ 745,000 words of writing like ours.
- A 500-word email ≈ 670 GPT tokens.
Anthropic’s own rule for Claude, about 1.8 tokens per word, is for typical English. For technical writing like ours, our estimate is closer to 2.
How to get an exact Claude or Gemini count
You need each company’s own counting API, and for Claude that means a developer account with credit on it.
- Claude: Anthropic’s token counting endpoint is free to call, but it needs an API key from the Claude Console, and a key won’t work until the account has credits. We checked on September 19, 2026: a new key on the free evaluation plan says “This key won’t work until you add credits.” A Claude Pro or Max subscription doesn’t include API access.
- Gemini: the Gemini API has a countTokens method that returns the exact count for the model you name.
- OpenAI: this page is already exact for plain text. For full requests with images, files or tools, see OpenAI’s token counting guide.
Your text stays on your device
Nothing you paste here is sent anywhere. Your browser downloads the GPT tokenizer once, and every count after that happens on your own device. So it’s safe to use with private prompts, client documents and code you haven’t released.
Frequently asked questions
How many tokens is 1,000 words?
About 1,200 to 1,550 GPT tokens for English, and 1,342 on average across our articles. On Claude Opus 4.7 and later it’s roughly 1,800 to 2,200. Code, numbers and other languages push it higher, so paste your own text above for a real count.
How many words is 1 million tokens?
About 745,000 words on GPT, going by our articles. Anthropic says 1M tokens holds about 555,000 words on Claude’s current tokenizer and about 750,000 on older Claude models.
Do spaces and punctuation count as tokens?
Yes, but not one for one. A single space usually joins the word after it, so “ the” is one token. Punctuation is often a token of its own, and extra spaces, tabs and blank lines take tokens too. In our test, three letters separated by a few spaces, a tab and some line breaks came to 6 tokens. Load some text above and the coloured view shows exactly where the splits fall.
Why doesn’t my API bill match this count?
Because a request is more than your text. Each message adds a few formatting tokens, and your system prompt, tool definitions, images and files all count as input. The model’s reply is billed as output tokens, and reasoning models also bill the tokens they spend thinking.
Is the GPT count right for GPT-6 Astra?
Probably, but it isn’t confirmed. OpenAI released GPT-6 Astra on September 3, 2026 and hasn’t said whether it changed the tokenizer. If it has, we’ll update this page.
Last updated: September 19, 2026



