Token counter for ChatGPT and OpenAI models

Prompt Expert's token counter shows how many tokens a text uses in ChatGPT and other OpenAI models. It splits the text with o200k_base, the tokenizer OpenAI lists for GPT-5 models, GPT-4.1 and GPT-4o, and shows every token, word and character. It is free, needs no login and runs entirely in your browser.

Updated · Prompt Expert

Count tokens

Tokens
77
Words
56
Characters
299

Your text, split into tokensEach colour is one token.
Write a LinkedIn post on why our design studio moved from HubSpot to Pipedrive.↵ Open with the result: we now save $3,000 a year.↵ Tell it as a short story: what hurt, what we tried, what changed.↵ Sound like us: plain and warm, no jargon.↵ Short lines, under 200 words, end with a question for readers.

Counted with o200k_base, the tokenizer OpenAI lists for GPT-5 models, GPT-4.1, GPT-4o and the o-series. OpenAI hasn't published the tokenizer for its GPT-6 models, and Claude and Gemini split text their own way, so for those the count is a guide. Your text stays in your browser.

What a token is

A token is the piece of text a language model reads and writes in one step. Common English words are usually one token, often with the space in front of them. Rare words, names, numbers and most non-English text break into several. Every model has a limit on how many tokens it can read and write, and API prices are set per million tokens, so the count decides both whether a prompt fits and what it costs.

The example prompt above is 77 tokens for 56 words. Across the English text of our own home page we measured about 1,310 tokens per 1,000 words, or 4.1 characters per token. Google gives a similar rule of thumb for Gemini: about 4 characters per token, and 100 tokens for 60 to 80 English words.

When to count tokens

  • Before you paste a long document into a chat, to see whether it fits in what the model can read at once.
  • When you write a system prompt, custom instructions or a project's instructions. Those words are sent again with every message, so each token you cut is saved on every turn.
  • When you estimate API costs: multiply the tokens by the model's price per million, for input and output separately.
  • When you translate a prompt, to see how much longer the other language makes it.

Token counts for everyday text

Each row was counted with the same tokenizer this page uses. Copy any of them into the box to see where it splits.

15 short texts, counted with o200k_base
TextWordsCharactersTokens
hello world2112
ChatGPT, Claude and Gemini4266
Summarize this email in three bullet points.74410
Act as a senior copywriter and rewrite this headline.95311
17 November 20263165
2026-11-173106
$1,234,567.891138
👍011
🇩🇪014
👨‍👩‍👧018
https://promptexpert.io/tools/token-counter/54411
{"name": "Ada", "role": "admin"}43212
for i in range(10): print(i)72810
Datenschutzgrundverordnung1265
مرحبا بالعالم2134

One character is not always one token. The family emoji is a single character on screen but 8 tokens, because it is several emoji joined together. Numbers split into groups of up to three digits, which is why long figures and dates cost more than they look.

The same sentence in six languages

Tokenizers learn their pieces mostly from English text, so other languages often need more tokens to say the same thing. Here is one sentence from our home page in the six languages we publish it in.

One sentence, six languages
LanguageSentenceTokensCompared with English
EnglishBring a real task and see what the expert asks.111.0x
Arabicأحضر مهمة حقيقية وشاهد ما يسألك عنه الخبير.161.5x
GermanBringen Sie eine echte Aufgabe mit und sehen Sie, was der Experte fragt.171.5x
SpanishTrae una tarea real y mira qué te pregunta el experto.131.2x
FrenchApportez une vraie tâche et voyez ce que l'expert vous demande.161.5x
ItalianPorta un compito reale e guarda cosa ti chiede l'esperto.171.5x

One short sentence is a small sample, so we also counted the full text of our home page in each language. Compared with English, Arabic needs 36% more tokens, Italian 27% more, French 22% more, German 19% more and Spanish 14% more. On a short prompt that hardly matters. On a long document, a big system prompt or a chat that runs all day, it adds up in both cost and context space.

Shorter prompts, same meaning

Most long prompts are long because of filler, not facts. These five rewrites keep everything the model needs and drop the rest. Together they use 63% fewer tokens, and every count is exact.

Before: 40 tokens

I was wondering if you could possibly help me out by writing a short email to my team letting them know that the meeting on Friday has been moved to Monday at 10am, if that's okay.

After: 20 tokens (50% fewer)

Write a short email telling my team that Friday's meeting has moved to Monday at 10am.

Before: 34 tokens

Please make sure that you always keep your answer very short and concise and to the point, and please do not make it too long or add things I didn't ask for.

After: 10 tokens (71% fewer)

Answer in under 50 words. No extras.

Before: 27 tokens

Can you please act as if you were a professional and very experienced marketing expert who has many years of experience writing ads for small businesses?

After: 11 tokens (59% fewer)

You are a senior ad copywriter for small businesses.

Before: 33 tokens

I would really like it if the output could be formatted as a list with bullet points instead of long paragraphs of text, because that is easier for me to read.

After: 8 tokens (76% fewer)

Format: bullet points, no paragraphs.

Before: 30 tokens

Translate the following text into German, and please make sure that the translation sounds natural and fluent and not like a word-for-word translation of the English.

After: 12 tokens (60% fewer)

Translate into natural, fluent German (not word for word):

Cut politeness, hedging and repetition. Keep names, numbers, examples and the format you want: those are the tokens that change the answer.

How the token counter works

  1. You paste or type text. The example above is already counted, so you can see a result before you type anything.
  2. The text is cut into chunks at spaces, punctuation and numbers, with the same rules as OpenAI's tiktoken library.
  3. Each chunk becomes bytes, and the bytes are merged into the longest pieces in o200k_base's vocabulary of 199,998 tokens.
  4. The page counts the pieces and shows them one colour each. Words and characters are counted the way a person would, in any language.

All of this happens in your browser. Your text is never sent to us or anyone else, and once the counter has loaded it keeps working offline. We check it against tiktoken's own expected results on 57 samples, from plain English to Japanese, Arabic, emoji and code, and it matches every token.

Where tokens are worth spending

A good prompt is not the shortest one. It is the one where every token does work. Most prompts that get good answers have five parts:

  • Role: who the model should be. One short line is enough: "You are a senior copywriter."
  • Context: the facts only you know, such as your business, your reader and what happened. This is where tokens pay off most.
  • Task: the one thing to do, as a verb: write, summarize, compare, fix.
  • Format: length, structure and tone. "Under 120 words, three bullet points" beats a paragraph of wishes.
  • Constraints: what to avoid or keep, such as words you never use or facts that must stay exact.

If a prompt is over budget, cut from the role and the politeness first, and from the context last.

Counting tokens for GPT-6, Claude and Gemini

OpenAI hasn't published which tokenizer its GPT-6 models use, and Claude and Gemini use their own tokenizers, which neither company publishes for browsers. The same text can give a different count in each, so use the number here as a guide for them, not an exact one.

  • Claude: Anthropic's API has a token counting endpoint. It is free to use within rate limits and needs an API key. Anthropic notes that models from Claude Opus 4.7 onward use a newer tokenizer, so counts from older Claude models don't carry over.
  • Gemini: the Gemini API can count the tokens in a request before you send it. It also needs an API key.
  • GPT-6: OpenAI hasn't published the tokenizer, so counts here are an estimate. The usage figures in each API response are exact.
  • Any model: every API response reports the tokens it actually used, and that is the number you are billed for.

A token counter measures a prompt. Prompt Expert writes it.

Prompt Expert is an AI prompt generator that brings the right experts to every job. They ask a few questions, read your website and files, and write the prompt for ChatGPT, Claude or Gemini with your real facts, each one showing where it came from.

See how it works

Questions

What is a token in ChatGPT?

A token is a chunk of text: often a whole word with the space before it, sometimes part of a word or a single character. ChatGPT reads and writes text as tokens, and its limits and prices are counted in them.

How many tokens is 1,000 words?

About 1,310 tokens for everyday English, by our count with o200k_base. Technical text, names, numbers and other languages use more, so paste your own text into the counter to be sure.

How many words is one token?

About 0.77 of an English word on average, or 4.1 characters. Short common words are one token each, while long or rare words split into several.

Do spaces and punctuation count as tokens?

Yes, but usually not on their own. A space mostly joins the word after it, so "hello world" is 2 tokens, not three. Runs of spaces, line breaks and punctuation do add up: four spaces on their own are 1 token.

Is the count exact for every model?

It is exact for models that use o200k_base: GPT-5 models, GPT-4.1, GPT-4o and the o-series. OpenAI hasn't published the tokenizer for GPT-6, and Claude and Gemini use their own, so for those the number is a guide. Use the providers' own counting tools when you need it exact.

Why does my language use more tokens than English?

The tokenizer's vocabulary favours English, so other languages split into smaller pieces. Across the full text of our home page, Arabic needs 36% more tokens than English, and every other language we publish in needs more too.

Is my text sent anywhere?

No. The counter runs in your browser. The page downloads the tokenizer's vocabulary once from our site, and your text never leaves your device.

Which models use o200k_base?

GPT-5 models (including the GPT-5.x versions), GPT-4.1, GPT-4o, o1, o3 and o4-mini, according to OpenAI's tiktoken library. Older GPT-4 and GPT-3.5 models use cl100k_base, which splits text differently. OpenAI hasn't said which tokenizer its GPT-6 models use.

Why do tokens matter?

They set the limits and the price. Every model has a maximum number of tokens it can read and write at once, and API use is billed per token, with output tokens usually costing more than input.