Free · Live · Nothing uploaded

AI token counter

Count tokens for GPT-4o, GPT-5, GPT-3.5/4, Claude and Gemini live as you type, with context-window fit and an API cost estimate. Real GPT tokenizer, runs entirely in your browser.

0tokens
0characters
0words
0%context used
$0.00est. cost
Exact
Context window & cost settings

Defaults are rough July 2026 examples for a representative model in each family — prices and context limits change often, so check your provider for current numbers.

🔒 Your text is counted entirely on your device — never uploaded, even for the exact GPT tokenizer.

How to count AI tokens

Check how many tokens a prompt costs before you send it — for context-window limits, API cost, or fine-tuning data prep.

🧩

1. Pick a model

Choose GPT, Claude, Gemini or another model family — each tokenizes text differently.

⌨️

2. Paste your prompt

Token, character and word counts update live with every keystroke.

📐

3. Check fit & cost

See what share of the context window you're using and an estimated API cost.

Useful for trimming a prompt to fit a model's context window, sanity-checking API costs before a big batch job, or estimating fine-tuning data size. GPT-4o, GPT-5, GPT-3.5 and GPT-4 counts use the same byte-pair-encoding tokenizer those models use internally; Claude, Gemini, Llama and Mistral counts are estimates, since those providers don't publish a downloadable tokenizer. Everything runs in your browser, so even confidential prompts and proprietary code stay private. For plain word and character counts, try the Word Counter.

Tokens are not words or characters

Language models operate on tokens, produced by a subword tokeniser that splits text into pieces drawn from a fixed vocabulary. Common words are usually a single token; rarer words break into several. For ordinary English prose, a useful approximation is about 0.75 words per token, or roughly four characters per token.

That ratio is a property of English specifically. Languages written in other scripts fare considerably worse, because the vocabulary was built predominantly from English text — the same sentence in Japanese, Thai, Hindi or Arabic can cost two or three times as many tokens, which makes the same request proportionally more expensive and consumes context faster. This is a real and under-discussed inequity in how these systems are priced.

Structure costs more than prose. JSON, code and markup spend tokens on braces, quotes and indentation, and whitespace is not free — repeated indentation in a long file can account for a surprising share of the total. Numbers tokenise poorly too, often splitting into several pieces per number, so a large table of figures is denser in tokens than its character count suggests.

Why counts differ between models

Each model family uses its own tokeniser and vocabulary, so the same text yields different counts depending on which model you are targeting. A count produced for one family is an estimate rather than an exact figure for another, and the gap widens for non-English text and for code.

Vocabularies have also grown over time, and larger vocabularies generally mean fewer tokens for the same text — newer models often encode identical input more efficiently than their predecessors. That is worth knowing when comparing costs, since a lower per-token price on one model does not automatically mean a lower cost per request.

Treat any count as an estimate with a margin, and leave headroom in your calculations rather than budgeting to the exact limit.

Budgeting a context window

The context window covers everything in the exchange: the system prompt, the conversation history, any retrieved documents, the current message, and the space the response will occupy. Requests fail when the total exceeds the window, and the most common cause is forgetting that the output needs room too — reserve it explicitly.

In a multi-turn conversation the history grows with every exchange, so cost per turn rises even if messages stay the same length, and eventually the earliest turns must be dropped or summarised. Retrieval-augmented systems face the sharper version: attaching several documents to a prompt can consume the window rapidly, so retrieving fewer, better-matched passages usually beats retrieving more.

Input and output are typically priced differently, with output the more expensive of the two, so an application generating long responses costs more than its input volume implies. Prompt caching, where a long unchanging prefix is billed at a reduced rate on subsequent calls, changes this arithmetic substantially for applications with a large fixed system prompt — worth checking against your provider's current pricing rather than assuming.

How many words is a token? Conversion table

For ordinary English prose one token averages about 0.75 words, or roughly 4 characters. That ratio is a planning estimate, not a rule — the counter above tokenises your actual text, which is the only exact answer. Code, markup, non-Latin scripts and unusual names all use more tokens per word than the table implies.

TokensApprox. wordsApprox. charactersRoughly
100 tokens~75 words~400A short paragraph
500 tokens~375 words~2,000A one-page memo
1,000 tokens~750 words~4,000Two pages, or a long email
2,048 tokens~1,500 words~8,200A short blog post
4,096 tokens~3,000 words~16,000A long article
8,000 tokens~6,000 words~32,000A short book chapter
16,000 tokens~12,000 words~64,000A long chapter
32,000 tokens~24,000 words~128,000A short thesis
128,000 tokens~96,000 words~512,000A full-length novel
200,000 tokens~150,000 words~800,000A long novel
1,000,000 tokens~750,000 words~4,000,000Around eight novels

Going the other way: 1,000 words is roughly 1,333 tokens, and 1,000 characters is roughly 250 tokens. A useful sanity check is that a token is about three-quarters of a word, so any word count multiplied by 1.33 lands close.

Token counter FAQ

What is a token?

A chunk of text a model reads or writes — often a word, part of a word, or punctuation. English averages about 4 characters, or ¾ of a word, per token.

Are the GPT counts exact?

Yes — GPT-4o/GPT-5 and GPT-3.5/GPT-4 counts use the real tokenizer those models use internally, run entirely in your browser.

Why are Claude and Gemini counts estimates?

Anthropic and Google haven't published a downloadable tokenizer, so those are estimated from their documented characters-per-token ratios — usually within a few percent.

Is my text uploaded?

No — counting happens entirely on your device, including the real GPT tokenizer.

How many tokens is a word?

For English prose, roughly 0.75 words per token, or about four characters per token. Other scripts often cost two to three times more, and code and JSON are denser than prose because punctuation and indentation consume tokens.

Why does my count differ from another tool's?

Each model family uses a different tokeniser and vocabulary, so counts vary by target model. Treat any figure as an estimate and leave headroom rather than budgeting to the exact limit.

How many words is 1,000 tokens?

About 750 words of English prose, or roughly 4,000 characters. The ratio holds at around 0.75 words per token, so 100 tokens is about 75 words and 10,000 tokens about 7,500 words. Code and non-Latin scripts run denser, so count the real text above rather than relying on the ratio.

How many tokens is 1,000 words?

Roughly 1,333 tokens for ordinary English. Multiplying a word count by 1.33 is a reliable planning estimate; 1,000 characters works out at about 250 tokens.

How much text fits in a 32k or 200k context window?

A 32,000-token window holds around 24,000 words, about a short thesis. A 200,000-token window holds around 150,000 words, about a full-length novel. Both figures must also cover the system prompt, the conversation history and the space the reply will occupy, so budget noticeably less than the maximum.

How do I count Claude or Gemini tokens?

Paste the text above and pick the model. Anthropic and Google do not publish downloadable tokenizers, so those counts are estimated from their documented characters-per-token ratios and land within a few percent. The GPT counts use the real tokenizer and are exact.