Free token counter

A quick estimate, not a bill.

Free token counter. Get a fast estimate of how many tokens your text would use with an AI model. Runs in your browser, no signup, no upload, no limit.

Paste your text to begin
0 chars / 0 words
bytes uploaded
0
usage limit
None
always
Free

Token counter

What the token counter does

Paste in a block of text and this tool gives you a quick estimate of how many tokens it would take up, the unit AI models use to measure both context window limits and, for paid APIs, cost. The count is based on splitting the text at whitespace and around punctuation, which tracks reasonably closely with how models actually break text apart, without being an exact match for any one of them.

It runs in your browser. Paste, read the number, done. Nothing is uploaded, there is no account, and there is no limit on how much text you check or how often you come back.

Tokens, in plain terms

What a token actually is, in plain terms

A token is the chunk of text a model actually processes internally, and it is not the same thing as a word or a character. A short common word is often one token. A longer or less common word can split into two or three. Punctuation marks frequently count as their own token, separate from the word next to them.

This matters because every model has a maximum number of tokens it can accept in a single request, its context window, and every paid API charges by the token rather than by the word or the character. Getting a rough count before you paste a long document somewhere saves you from hitting a limit or a bill you did not expect.

How it works

How to count tokens in your text in three steps

Nothing to configure. The count updates as fast as you can paste.

Step 1
Paste your text into the input box.
Step 2
The estimated token count appears immediately, on your own device.
Step 3
Trim your text if you're close to a limit, and check the count again.

Straight answer

Is this the exact count a specific model would use?

No, and no tool that runs entirely in your browser without downloading a specific model's tokenizer can honestly promise that. Each model family, whether from OpenAI, Anthropic, Google or elsewhere, uses its own tokenizer, built from its own vocabulary, trained on its own data. Two different models can and do count the same sentence differently, sometimes by a meaningful margin.

This tool gives you a fast, reasonable estimate based on where a typical model is likely to split text: at word boundaries and around punctuation. Treat the number as a planning figure, close enough to budget your text against a limit, rather than the precise value an API would bill you for or enforce as a hard cutoff.

What moves the number

What makes a token estimate vary from the real thing

Code is one of the biggest sources of divergence: symbols, indentation and unusual identifiers tokenise very differently across models, and a word-and-punctuation estimate does not capture that behaviour precisely. Non-English text, especially languages that do not separate words with spaces, can tokenise at a very different rate than English does, sometimes using more tokens per character, sometimes fewer.

Repeated or unusual punctuation, uncommon technical vocabulary, and long strings of numbers or symbols all push a real tokenizer's count away from a simple word-based estimate, in either direction.

Why it matters

Why context windows and token limits exist at all

A model's context window is the maximum amount of text, counted in tokens, it can consider at once, spanning your prompt, any earlier conversation, and its own reply. Go over that limit and older content gets dropped or the request fails outright, which is why a rough count before you paste something long is worth the ten seconds it takes.

For paid usage, the token count also drives the bill directly, since most providers charge per token for both what you send and what the model sends back. Estimating before you commit to a long input avoids an unpleasant surprise on either front.

Who uses it

Who uses a token counter, and when

Developers building against a paid API use it to sanity-check a prompt template before running it against real traffic, catching an oversized input before it becomes an oversized bill. Anyone working with a model's context window, feeding in a long document, a full conversation history, a large code file, uses it to see roughly how close they are to the ceiling.

Writers and researchers preparing text to paste into a chat interface use it to gauge whether a long passage will fit in one go or needs splitting into parts first.

FAQ

Token counter FAQ

Everything below is answered in full, nothing to click open.

How do I count the tokens in my text?

Paste your text into the box above. The estimated token count appears immediately, with nothing to click and nothing uploaded.

Is the token counter free?

Yes, entirely free. There is no signup, no trial and no usage limit, because the tool runs in your browser rather than on a server we pay to operate.

Is my text uploaded anywhere?

No. The count is calculated on your own machine in JavaScript. Nothing is sent over the network, which is why it is safe for confidential drafts.

Is this the exact number tokens ChatGPT would count?

No. Each model family uses its own tokenizer with its own vocabulary. This gives a reasonable estimate, not an exact match to any specific model's count.

Does it match Claude's or Gemini's token count exactly?

No, for the same reason: every model's tokenizer is different. Treat this as a planning estimate rather than the precise figure any one provider would bill or enforce.

Why does my token count differ from what an API actually charged me?

The API used its own model-specific tokenizer, which can split text differently than a general word-and-punctuation estimate, especially around code, symbols or non-English text.

What counts as one token?

Roughly a word or a piece of a longer word, plus punctuation marks, which often count separately from the word beside them. It is not the same as a character count or a word count.

Why do context windows matter?

A context window is the maximum number of tokens a model can consider at once, covering your prompt, prior conversation and its reply. Going over it means older content gets dropped or the request fails.

Does code tokenise the same way as prose?

No. Symbols, indentation and unusual identifiers in code tokenise differently across models, and a word-based estimate is less precise for code than for ordinary prose.

Does non-English text use more or fewer tokens?

It varies by language and by model. Some languages tokenise less efficiently than English and use more tokens for the same amount of meaning; others use fewer.

Can I use this to estimate API costs?

As a rough guide, yes. For an exact bill, use the specific token count your provider's own tool or API response reports, since pricing is based on their tokenizer, not this estimate.

Does punctuation count as its own token?

Often, yes. Many tokenizers split punctuation away from the word next to it, which is part of why this estimate counts punctuation separately too.

Does it work on large documents?

Yes. There is no length cap and no run limit, so a long document counts the same as a short paragraph.

Does it work on phones?

Yes. It works in any modern mobile browser with no app to install.

Is it safe for confidential or unpublished text?

Yes. Nothing leaves your browser, so it's fine for a draft you have not shared with anyone yet.

Why does the count change slightly if I add one word?

Adding a word can add more than one token if that word is long or uncommon, and it can also change how neighbouring punctuation is counted.

Is there a batch mode or an API?

Not yet. For several documents, the fastest route right now is paste, read the count, repeat.

Do I need a browser extension?

No. It is a web page. Open it, paste, read the count.

Does it count words instead of tokens?

No, tokens and words are different units. A word count is usually lower than a token count, since many words split into more than one token and punctuation adds further tokens.

Can I trust this number for a strict, hard limit?

Use it as an early warning rather than a hard guarantee. If you are right at the edge of a limit, verify with the specific model's own tokenizer before you rely on the number.

Get a token estimate in about four seconds.

Paste, read the number. Nothing to install, nothing leaving your browser.

Count my tokens