What is a token in AI?
In one minute
A token is a small piece of text that an AI uses when it reads and writes.
AIs that handle language, like ChatGPT and Claude (large language models), first cut text into tokens and swap each one for a number before reading it. When they write an answer, they also pick the next token one at a time and string them together. Tokens come in different sizes: a common word like “Hello” can be one token, while a single Japanese character can be split into two or more tokens.
How much an AI can read and write at once, and pay-as-you-go prices for using it, are counted in tokens, not characters. Usually, the longer a chat gets, the more tokens the AI reads each time, and it can get harder for it to recall what was said early on. And when AIs of different kinds (from different companies or generations) cut text differently, the same sentence gives a different number of tokens.
A common mix-up
“One token is one character (or, in English, one word).”
That is only half right. A character or a word often does come out as exactly one token. But the five-character Japanese word こんにちは (“hello”) can be one token, while a single character can be split into two or more tokens. The way text is cut can differ between kinds and generations of AI, and then the same sentence gives a different count.
Explained in pictures
Think of it like this
Making a letter with stamps
Imagine making a letter with a set of rubber stamps. Besides stamps for single letters like “a” and “b,” the set has stamps with whole common words carved on them, like “the” and “hello.”
A common word takes just one press. A rare word has to be built from many presses of small stamps. The number of presses is the number of tokens. Just as a sheet of paper only has so much room, the amount an AI can read and write at once has a limit counted in these presses.
But nobody picked the stamps in an AI’s set by hand. The set is made automatically by counting which pieces show up together most often in lots of text, and it can differ between kinds and generations of AI. Also, the AI does not look at the shapes of the stamps. It reads a list of the numbers printed on them.
Key points
Why pieces, and not whole characters or words?
If you keep a list of whole words, you get stuck when a new word or an unusual name shows up that is not on the list. If you cut everything into single characters instead, you can read any word, but the text turns into a very long line of pieces that takes more work to handle.
So common runs of letters become one big piece, and rare words become a combination of small pieces. The AI company Anthropic also explains that bigger pieces are more efficient, while smaller pieces let a model handle words it has never seen. For example, “tokenization” is cut into “token” and “ization” (GPT-4o’s tokenizer).
Who decides the pieces, and how?
No one picks them one by one. They are made automatically from lots of text. In a common method, you start with the smallest units, each as its own piece. Then you find the two pieces that sit next to each other most often in the text and join them into one new piece. You repeat this until the set reaches a chosen size.
For example, if “in” is followed by “g” very often in lots of text, the two are joined into one piece, “ing.” OpenAI’s guide to its tokenizer, too, says “ing” is a common piece in English, so “encoding” is cut into “encod” and “ing.” That way, the more often a run of letters shows up, the more likely it is to become one big piece. The same idea also works for text in languages like Japanese, which do not put spaces between words.
How does Japanese get cut?
In Japanese, too, the number of characters and the number of tokens do not line up. GPT-4o’s tokenizer turned the nine characters of 私は猫が好きです。 (“I like cats.”) into six tokens: 私は, 猫, が, 好き, です and 。. The four-character Japanese word トークン (“token”) became three tokens: ト, ーク and ン.
The same meaning can take a different number of tokens in a different language. “I like cats.” was four tokens, and 私は猫が好きです。, which means the same, was six (both with GPT-4o’s tokenizer). With the older GPT-4 tokenizer, the same Japanese sentence was ten tokens, and the single character 猫 (“cat”) was split into three (the figure caption explains why).
What does the number of tokens decide?
One thing is the limit on how much an AI can read and write at once. This is called the “context window,” and it is like the AI’s “working memory” (Anthropic’s explanation). For example, Claude’s newer models can handle 1 million tokens (November 2026). Google’s guide describes 1 million tokens as, among other things, “8 average length English novels” (that is for English; other languages give different token counts). A very long document may not fit.
The other is price. Where you pay for how much you use (for example, when a company builds an AI into its own app), the price is set by the number of tokens, and the tokens the AI reads and writes are counted separately. With Claude, the tokens it writes cost five times as much as the tokens it reads (November 2026).
Why do long chats use more tokens?
Because usually, each time the AI writes a reply, it reads the whole conversation from the start (Anthropic’s explanation). In a chat with 10 back-and-forths, the 10th reply also reads the 9 earlier ones. Some apps drop or shorten the oldest parts to keep the reading down.
So in a long chat, the AI not only gets closer to the limit; Anthropic also writes that as the tokens pile up, it can get harder for the AI to recall what was said early on. Starting a new chat when the topic changes cuts down the reading.
Is it the same as a crypto token or a login token?
No. The English word “token” originally meant “a sign” (Old English tācn), and it can also mean a coin used in place of money. Different fields use it for different things.
In crypto, a token is a digital marker whose owner can be recorded. In logging in, an access token is a string of characters that shows an app is allowed to do certain things for a set time. When people talk about AI, a token usually means the “piece of text” on this page.
Check yourself
Q1The Japanese word トークン (“token”) has four characters. Cut with GPT-4o’s tokenizer, how many tokens did it become?
Answer and explanation
Answer: C 3 tokens
It became three tokens: ト, ーク and ン. Not one per character, and not the whole word as one. On the other hand, こんにちは (“hello”) was five characters but one token. The number of characters and the number of tokens do not line up.
Q2With GPT-4’s tokenizer, why was the single character 猫 (“cat”) split into several tokens?
Answer and explanation
Answer: B A character not in its set is cut by the numbers that store it
Under the rule called UTF-8, 猫 is made of three small numbers. GPT-4’s tokenizer builds its pieces up from these small numbers, so with no piece for the whole of 猫 in its set, it stayed as three. With GPT-4o’s tokenizer, 猫 is one token.
Q3In a chat, when the AI writes a reply, what does it usually read?
Answer and explanation
Answer: A That turn’s question and everything said before it
Usually, for each reply, the AI reads everything said so far all over again. The earlier messages are not kept inside the AI; they are read again together with the new question every time. That is why the longer the chat, the more tokens it reads each time (some apps drop or shorten the oldest parts).
More on this → Key points: Why do long chats use more tokens?
Related terms
- Large language model
- Context window
- Tokenizer
- Mixture of experts
- Machine learning
Questions that use this term
Sources and how we checked
- Anthropic, "Glossary" (Tokens, Context window)
- Anthropic, "Context windows"
- Anthropic, "Pricing" (checked November 6, 2026)
- Google, "Understand and count tokens" (Gemini API)
- Google, "Long context" (Gemini API; what 1 million tokens looks like)
- Google, "Machine Learning Glossary: Language" (token, tokenizer, auto-regressive model)
- OpenAI, "tiktoken" (the splitting examples on this page were made with version 0.14.0 on November 6, 2026)
- OpenAI, tiktoken model.py (GPT-4o uses o200k_base, GPT-4 uses cl100k_base)
- OpenAI, tiktoken _educational.py (BPE starts with one piece for each byte value)
- Rico Sennrich et al., "Neural Machine Translation of Rare Words with Subword Units" (arXiv 2015, ACL 2016)
- Taku Kudo and John Richardson, "SentencePiece" (arXiv 2018, EMNLP 2018)
- RFC 3629, "UTF-8"
- ethereum.org, "Non-fungible tokens (NFT)"
- RFC 6749, "The OAuth 2.0 Authorization Framework" (access tokens)
- Wiktionary, "token"
AI wrote this page from the sources above, and a different AI checked it against the text of those sources (November 6, 2026). A person with a master’s degree in science and a Japanese high-school science teaching license also read and checked it before publishing. Numbers are as of that date. If anything was hard to follow, you spot a mistake, or there’s a term you’d like explained, please write to [email protected].