Token counter

Count tokens for OpenAI and Claude models from pasted text.

FreeRuns in your browserNo signupUpdated 2026-10-29

Everything is counted in your browser. Nothing is sent anywhere.

OpenAI tokens

42

o200k_base: exact for GPT-4o to GPT-5, close for GPT-6

Claude tokens (estimate)

54

Characters ÷ 3.5

MeasureValue
Characters187
Words34
Characters per OpenAI token4.45
OpenAI tokens per word1.24

How the text splits into tokens

Write a short welcome email for new customers of a bookkeeping app. Keep it under 120 words, use a friendly tone, and end with a link to the getting-started guide. Do not mention pricing.

The Claude figure is an estimate. Anthropic's tokenizer is not available in the browser; use the token-counting endpoint for an exact number. The OpenAI figure is exact for GPT-4o through GPT-5 and a close estimate for GPT-6 models. Code and non-English text usually need more tokens per character.

About this tool

How it works and how to read the result.

Need this done for you?

AI features for your product

Add AI search, chat and generation to your existing app.

See the service

What it does

A token counter tells you how much text you are really sending to a language model, because models bill and limit by tokens, not words. Paste a prompt, a document or a reply and the page counts tokens with o200k_base, the encoding behind GPT-4o through GPT-5, shows an estimate for Claude, and colours the text so you can see where each token starts and ends. The count runs in your browser; nothing is uploaded.

How to use it

  1. Paste the text you plan to send, including any system prompt or instructions.
  2. Read the OpenAI figure, exact for GPT-4o through GPT-5 and close for GPT-6, and the Claude estimate beside it.
  3. Scroll the coloured preview to see how the text splits. Long words, numbers and code break into more pieces than you might expect.
  4. Use Copy counts to paste the figures into a budget sheet or a ticket.

How to read the result

Suppose a support macro of 620 characters and 110 words counts as 142 OpenAI tokens. That is about 4.4 characters per token, typical for plain English. Sent 5,000 times a day on GPT-6 Luna at $0.10 per million input tokens, those 142 tokens cost about 7 cents a day. The same text estimated for Claude comes to around 178 tokens, because the estimate is deliberately conservative.

If the ratio drops to 2 or 3 characters per token, something in the text is expensive: JSON with lots of punctuation, URLs, base64 strings or text in a non-Latin script. Trim or summarise those parts first when you need to cut cost or fit inside a context window.

The number you need for planning is tokens per request multiplied by requests per month. Carry that into the AI API cost calculator to turn it into a bill.

Token budgets matter most when you are building a feature that calls a model on every user action. Our AI product features work starts with exactly this kind of measurement.

Questions

Frequently asked.

Why is the Claude count an estimate?

Anthropic does not publish a tokenizer that runs in the browser, so the page divides characters by 3.5, which is close for English prose. For an exact figure, call the token-counting endpoint in the Anthropic API. Code, tables and non-English text usually need more tokens than the estimate shows.

Which OpenAI models use this count?

The count uses o200k_base, the encoding OpenAI published for GPT-4o, GPT-4.1, the o-series and GPT-5. The open-source tokenizer the page runs does not cover GPT-6 models yet, so for GPT-6 Astra, Sol, Terra and Luna treat the figure as a close estimate rather than an exact count.

How many words is a token?

For English, about three quarters of a word, so 100 tokens is roughly 75 words. Short common words are often one token; longer or rarer words split into two or three. Punctuation, line breaks and spaces count too, which is why formatted text costs more than it looks.

Your next move

Like what you see? Tell us about it.

A process that takes too long, a website that undersells you, or an idea ready to take shape. Tell us where you are and we will suggest a useful next step.

India · Working with clients worldwide

We reply within a working day. No spam, ever.