Free token counter for Claude, GPT and Gemini

The Token Counter shows how many tokens your text uses in GPT, Claude, Gemini, DeepSeek, Llama and more, how much of each context window it fills, and what it costs to send. It also detects the language of your text and shows how much more or less that language costs than English, with a table comparing about 100 languages. Counting runs in your browser; nothing is uploaded.

Your text0 characters•0 words•0 lines
Token count, context-window use and input cost for each model
ModelTokensContext window usedInput cost
GPT-4oOpenAI0Exact
0.00% of 128K
$0.00
GPT-4o miniOpenAI0Exact
0.00% of 128K
$0.00
GPT-4 / GPT-3.5OpenAI0Exact——
Claude Opus 5.5Anthropic~0Estimate
0.00% of 1M
$0.00
Claude Sonnet 5.5Anthropic~0Estimate
0.00% of 1M
$0.00
Claude Haiku 4.5Anthropic~0Estimate
0.00% of 200K
$0.00
Gemini 3.6 FlashGoogle~0Estimate
0.00% of 1.05M
$0.00
Gemini 3.1 ProGoogle~0Estimate
0.00% of 1.05M
$0.00
DeepSeek V4-FlashDeepSeek~0Estimate
0.00% of 1M
$0.00
Llama 3 / 4Meta~0Estimate——
Mistral LargeMistral~0Estimate——
GrokxAI~0Estimate——

OpenAI counts use OpenAI's published tokenizers and are exact. Other providers don't publish a tokenizer that runs in a browser, so their counts (marked ~) are scaled from the GPT-4o count and typically land within 10–15% for English text; code and non-English text can drift further. Cost is one input-only call at list prices as of September 2026; "—" means no price on file.

Compare languages

The same 20 sentences, translated into 108languages, counted with OpenAI's two published encodings. The ratio is a language's token total divided by the English total for the same sentences, so English is 1.00.

Ratio to English: highest and lowest

The 8 languages with the highest ratio, then the 5 with the lowest, of those measured. English = 1.00.

  • Santali15.29×
  • Dzongkha9.49×
  • Tibetan8.98×
  • Lao8.78×
  • Tigrinya6.20×
  • Amharic6.12×
  • Odia5.51×
  • Khmer3.79×
  • Danish1.38×
  • Dutch1.33×
  • Indonesian1.30×
  • Chinese (Simplified)1.29×
  • Portuguese1.29×
Tokens per sentence and ratio to English for each measured language, using o200k_base (GPT-4o). Column headings sort the table.
SantaliOl Chiki349.415.29×
DzongkhaTibetan216.99.49×
TibetanTibetan205.38.98×
LaoLao200.78.78×
TigrinyaEthiopic141.76.20×
AmharicEthiopic139.96.12×
OdiaOdia125.85.51×
KhmerKhmer86.73.79×
BurmeseMyanmar78.43.43×
Central KurdishArabic68.83.01×
PunjabiGurmukhi67.82.97×
SinhalaSinhala65.32.86×
UyghurArabic62.02.71×
YorubaLatin58.72.57×
GreekGreek53.72.35×
SanskritDevanagari51.52.25×
BelarusianCyrillic49.52.17×
KannadaKannada49.02.15×
AssameseBengali48.72.13×
TamilTamil48.22.11×
ThaiThai48.12.11×
Northern KurdishLatin47.52.08×
MalteseLatin47.42.07×
MalayalamMalayalam47.42.07×
SamoanLatin47.42.07×
TeluguTelugu46.92.05×
TajikCyrillic46.02.01×
MaithiliDevanagari45.51.99×
MacedonianCyrillic45.51.99×
MāoriLatin45.01.97×
SerbianCyrillic44.91.96×
GeorgianGeorgian44.41.94×
IrishLatin44.41.94×
ArmenianArmenian44.31.94×
AlbanianLatin44.31.94×
MongolianCyrillic44.11.93×
MarathiDevanagari43.71.91×
PashtoArabic43.41.90×
BhojpuriDevanagari43.31.90×
SindhiArabic43.01.88×
GujaratiGujarati43.01.88×
BengaliBengali42.91.88×
HungarianLatin42.81.87×
LatvianLatin42.81.87×
UkrainianCyrillic42.81.87×
UzbekLatin42.11.84×
KinyarwandaLatin42.01.84×
WelshLatin41.91.83×
SomaliLatin41.81.83×
SlovakLatin41.51.81×
CebuanoLatin41.41.81×
BulgarianCyrillic41.31.81×
RomanianLatin41.11.80×
LugandaLatin41.01.80×
UrduArabic41.01.79×
IcelandicLatin40.91.79×
AzerbaijaniLatin40.71.78×
TagalogLatin40.51.77×
ZuluLatin40.31.76×
NepaliDevanagari40.01.75×
LithuanianLatin40.01.75×
WolofLatin39.91.75×
ShonaLatin39.81.74×
BasqueLatin39.51.73×
HindiDevanagari39.51.73×
KyrgyzCyrillic39.51.73×
PolishLatin39.11.71×
JapaneseHan + Kana39.01.71×
CzechLatin38.81.70×
LingalaLatin38.71.69×
IgboLatin38.51.69×
ChichewaLatin38.21.67×
EstonianLatin38.11.67×
XhosaLatin38.11.67×
PersianArabic37.71.65×
FinnishLatin37.51.64×
KazakhCyrillic37.41.64×
CatalanLatin36.81.61×
CroatianLatin36.51.60×
SlovenianLatin36.31.59×
HebrewHebrew35.91.57×
ItalianLatin35.91.57×
SwahiliLatin35.91.57×
KoreanHangul35.81.57×
DariArabic35.81.56×
HausaLatin35.21.54×
VietnameseLatin34.61.52×
AfrikaansLatin34.41.51×
Chinese (Traditional)Han (Traditional)34.31.50×
TurkishLatin34.01.49×
CantoneseHan (Traditional)34.01.49×
Egyptian ArabicArabic33.71.47×
Norwegian (Bokmål)Latin33.41.46×
FrenchLatin33.31.46×
SpanishLatin33.31.46×
RussianCyrillic33.01.45×
ArabicArabic32.81.43×
GermanLatin31.91.40×
JavaneseLatin31.91.40×
SundaneseLatin31.91.40×
MalayLatin31.61.39×
SwedishLatin31.51.38×
DanishLatin31.41.38×
DutchLatin30.41.33×
IndonesianLatin29.81.30×
Chinese (Simplified)Han (Simplified)29.51.29×
PortugueseLatin29.41.29×
EnglishLatin22.91.00×

Sentences come from the FLORES-200 devtest set (NLLB Team, Meta AI), licensed CC BY-SA 4.0. 20 fixed sentences per language is a small sample, so read the ratios as a comparison between languages on this text, not as a promise for yours. Counts are exact for these two encodings; Claude, Gemini and other models use different tokenizers that may behave differently.

Models and tokenizers supported

Every model below is counted on each paste. “Exact” means the count comes from the provider's published tokenizer; “Estimate” means it is scaled from the GPT-4o count.

ModelProviderTokenizerAccuracy
GPT-4oOpenAIo200k_baseExact
GPT-4o miniOpenAIo200k_baseExact
GPT-4 / GPT-3.5OpenAIcl100k_baseExact
Claude Opus 5.5AnthropicClaude tokenizerEstimate
Claude Sonnet 5.5AnthropicClaude tokenizerEstimate
Claude Haiku 4.5AnthropicClaude tokenizerEstimate
Gemini 3.6 FlashGoogleGemini tokenizerEstimate
Gemini 3.1 ProGoogleGemini tokenizerEstimate
DeepSeek V4-FlashDeepSeekDeepSeek tokenizerEstimate
Llama 3 / 4MetaLlama tokenizerEstimate
Mistral LargeMistralMistral tokenizerEstimate
GrokxAIGrok tokenizerEstimate

What the Token Counter does

The Token Counter is a free token counter for Claude, GPT, Gemini and other models. Paste a prompt, a document or a block of code and it shows the token count for each model side by side, how much of the model's context window the text fills and what it costs to send once as input. It runs in your browser, so your text is not uploaded.

A token is a chunk of text a model reads, roughly three-quarters of a word in English. Each provider splits text with its own tokenizer, so one text gives a different count in each model. OpenAI publishes its tokenizers, so the GPT counts here are exact. Anthropic, Google and the other providers do not publish a tokenizer that runs in a browser, so the Claude, Gemini, DeepSeek, Llama, Mistral and Grok counts are estimates scaled from the GPT-4o count and are marked with a ~. To shorten a prompt that is too long, use the token optimizer. To see what a rewrite saves in money, use the token cost calculator.

The Token Counter is also language-aware. A model uses one tokenizer for every language, but the same meaning costs a different number of tokens depending on the language: English is usually cheapest, and many other languages and scripts cost more. When you paste text of 20 characters or more, the counter detects its language, shows tokens per word and per character for your text, and gives the measured cost of that language compared with English. The comparison comes from the same 20 sentences translated into about 100 languages (the FLORES-200 set) and counted with OpenAI's two published encodings, and a table on the page lets you compare every language.

How to use the Token Counter

  1. 1

    Paste your text

    Add a prompt, a system message, an article or code. The counts update as you type.

  2. 2

    Read the counts

    Each model shows its token count and whether it is exact or an estimate, next to the characters, words and lines in your text.

  3. 3

    Check the context window

    The bar shows how much of the model's context window the text takes up, so you know before you hit a limit.

  4. 4

    See the language cost

    If the text is long enough to identify its language, a panel shows tokens per word and per character and how that language compares with English. The Compare languages table covers every language in the data.

  5. 5

    Compare cost

    Where a price is on file, you see what sending the text once as input costs. Shorten it with the token optimizer if it is too long.

Example: before and after

Before

Summarise the attached quarterly report in three bullet points for the board.

After

GPT-4o: 15 tokens (exact)
Claude Sonnet 5.5: about 18 tokens (estimate)
Gemini 3.6 Flash: about 16 tokens (estimate)

The same sentence is a different length in each model. For short text the gap is a token or two; for a long document it can be thousands.

Who the Token Counter is for

  • Developers

    Check a prompt fits the context window and estimate API cost before sending it.

  • Prompt engineers

    See the token weight of each version while you tighten a prompt.

  • Teams on a budget

    Compare what the same prompt costs on different models.

  • Writers and researchers

    Find out whether a long document fits in one chat.

Token Counter FAQ

How do I count tokens for Claude?

Paste your text and read the Claude rows. Anthropic does not publish a tokenizer that runs in a browser, so these counts are estimates (marked ~): the GPT-4o count scaled up by about 20%, which is how Claude usually compares on English text. For exact figures to budget against, use Anthropic's own token counting API.

How many tokens is 1,000 words?

As a rough rule, about 1,300 tokens for plain English prose in GPT-4o, or roughly three-quarters of a word per token. This is approximate: code, tables, numbers and non-English text use more tokens per word, and Claude counts higher than GPT. Paste your own text for a real count.

Why do Claude and GPT token counts differ?

Each model splits text into tokens with its own vocabulary, so the same words can come out as more or fewer tokens. Claude usually counts a little higher than GPT-4o on English text.

Why are some counts marked as estimates?

Anthropic, Google and most other providers do not publish a tokenizer that can run in a browser. Their counts are scaled from the exact GPT-4o count and typically land within 10 to 15 percent for English text; code and other languages can drift further.

Is this an OpenAI tokenizer alternative?

It uses OpenAI's published tokenizers (o200k_base for GPT-4o and newer, cl100k_base for GPT-4 and GPT-3.5), so GPT counts are exact. It also shows other providers' counts, context-window use and input cost beside them on one page.

Does the token counter work for other languages?

Yes. It counts any language, and it also detects the language of text of 20 characters or more and shows how that language compares with English. The tokenizers themselves are the same for every language, so what changes is how many tokens the same meaning takes. Detection is a statistical guess and can miss on short or mixed text, in which case no comparison is shown.

Where does the language comparison come from?

From 20 fixed sentences translated into about 100 languages in the FLORES-200 dataset (CC BY-SA 4.0), counted with OpenAI's o200k_base and cl100k_base encodings. The ratio is a language's total divided by English for the same sentences. It is a small sample measured on those two encodings, not on your text or on other providers' tokenizers. The data page shows where the numbers come from and how the tool uses them, and the formal write-up is a research report you can download as a PDF.

Does the counter send my text anywhere?

No. Counting runs in your browser, so the text you paste is not uploaded.

Is the token counter free?

Yes, with no sign-in and no daily limit.

Prompts to try it on

Browse the Prompt Cookbook
Data Analysis & Data Science

AI Prompt to Audit BigQuery Query Costs Using Google Cloud's MCP Server

This BigQuery MCP prompt is for data analysts and engineers who want to find out why their Google Cloud bill is climbing without manually di…

ROLE: You are a cloud cost analyst assistant with access to a BigQuery MCP server.

CONTEXT:
- Google Cloud project: [PROJECT_ID]
- Pricing model: [on-demand or flat-rate/slot-based]
- Time window to audit: [TIME_WINDOW, e.g. last 7 days]
- Cost or bytes-scanned threshold to flag: [THRESHOLD]

TASK:
1. Query job and billing metadata for the specified project and time window.
2. Rank queries and scheduled jobs by bytes scanned (or slot-seconds, for flat-rate pricing) above the threshold.
3. Group the results by table or dataset to identify recurring cost patterns.
4. For each high-cost pattern, identify the likely cause (e.g. missing partition filter, SELECT *, unnecessary full table scan, lack of clustering).
5. Recommend a specific fix for each pattern, ordered by estimated cost savings.

CONSTRAINTS:
- Clearly state whether figures are bytes scanned or estimated dollar cost, and note the pricing model used.
- Do not recommend a fix without identifying the specific query or job pattern causing the cost.

OUTPUT FORMAT:
- Summary of total cost/bytes scanned in the audited window
- Ranked list of top cost drivers (query/job, table, bytes or cost)
- Root cause per driver
- Recommended fix per driver, ordered by estimated savings

Make this prompt yours

RAG & Knowledge Retrieval

AI Prompt to Make a RAG Assistant Say 'I Don't Know' When Context Is Missing

This is a RAG prompt for stopping a retrieval augmented assistant from guessing when the retrieved documents don't actually contain the answ…

ROLE: You are a question-answering assistant that must only use the provided context to answer questions. You must never use outside knowledge, even if you know the answer.

CONTEXT:
[PASTE RETRIEVED DOCUMENT CHUNKS HERE]

QUESTION: [USER'S QUESTION]

INSTRUCTIONS:
1. Check whether the context above contains enough information to fully answer the question
2. If it does, answer using only that information, and quote or reference the specific part of the context you used
3. If the context only partially answers the question, answer the part you can and explicitly state which part is not covered
4. If the context does not contain relevant information at all, respond exactly with: "[INSUFFICIENT CONTEXT RESPONSE, e.g. I don't have enough information in the provided documents to answer this.]"
5. Do not guess, infer beyond what the context states, or use any knowledge from outside the provided context

CONSTRAINTS:
- [ANY ADDITIONAL CONSTRAINT, e.g. keep answers under 150 words, cite chunk numbers if provided]

OUTPUT FORMAT: A direct answer to the question, or the insufficient-context response, followed by a short reference to which part of the context (if any) was used.

Make this prompt yours

React Prompt Recipes

AI Prompt to Turn a Design Screenshot into a React Component

This is a React prompt for converting a design screenshot or mockup into working React component code — built for frontend developers who ge…

ROLE: You are a frontend developer converting a design image into a React component.

CONTEXT: I'm attaching a design screenshot/mockup. Tech stack: [REACT VERSION, STYLING APPROACH e.g. Tailwind/CSS Modules/styled-components, COMPONENT LIBRARY IF ANY]

TASK:
1. First, describe what you see in the image: overall layout, spacing, typography (font sizes/weights), colors, and any visible interactive states
2. Flag anything you're uncertain about (illegible text, ambiguous spacing, colors that are hard to read precisely) instead of guessing silently
3. Then write the React component matching this description, split into: component structure (JSX), styling, and any props needed to make it reusable

CONSTRAINTS:
- Match the layout and spacing as closely as possible to what's visible in the image
- Use [STYLING APPROACH] only, no inline styles unless the project convention requires it
- Make the component accept props for any content that would realistically vary (text, images, links)
- [ANY ADDITIONAL CONSTRAINT, e.g. must be accessible, must support dark mode]

OUTPUT FORMAT:
1. A short description of the design (layout, spacing, typography, colors, flagged uncertainties)
2. The complete component code in a fenced code block
3. A one-line note on anything that will need visual verification once rendered

Make this prompt yours

Further reading: Claude API Pricing: Cost per Request Calculator