What Are Tokens, and Why AI Doesn't Read Words
Learn how AI breaks text into pieces called tokens, why that affects cost and conversation memory, and see real examples in Portuguese and English.
Rodrigo Faustino ·
- Shelf
- Inside AI
- Call number
- DEN-001
- Level
- Beginner
- Reading
- 7 min
- Published
- Labs
- Tokenizer, Quiz
Language models don’t read words or letters. They read tokens: pieces of text that can be a whole word, part of a word, or a punctuation mark. Understanding tokens explains three everyday things about working with AI: why it makes mistakes when counting letters, why long conversations “forget” the beginning, and how companies charge for usage.
Text Becomes a Line of Numbers
Before anything else happens, a program called a tokenizer chops your text into known pieces and swaps each piece for a number. That line of numbers is what the model actually receives. It never sees the text the way you do.
Every tokenizer has its own dictionary of pieces, learned from a huge amount of text. Common words usually become a single token. Rare words, long words, and words from other languages get broken into parts. With the tokenizer used by OpenAI’s GPT-4o models, “Inteligência artificial” (Portuguese for “artificial intelligence”) becomes four tokens: “Int”, “elig”, “ência”, and “ artificial”, with the space attached to the front of the last one.
Watch the Tokenizer Work
Pick an example or type any sentence into the lab. It uses the same tokenizer as the GPT-4o models, running right in your browser.
The o200k_base tokenizer, used in OpenAI's GPT-4o models. Each company has its own, and the counts change from one to another. The ␣ symbol marks a space that is part of the token.
Artificial intelligence
Artificial␣intelligence
23 characters · 2 words · 2 tokens
AI doesn't read words: it reads pieces called tokens.
AI␣doesn't␣read␣words:␣it␣reads␣pieces␣called␣tokens.
53 characters · 9 words · 11 tokens
unconstitutionally
unconstitutionally
18 characters · 1 words · 3 tokens
Inteligência artificial
Inteligência␣artificial
23 characters · 2 words · 4 tokens
Olá, tudo bem?
Olá,␣tudo␣bem?
14 characters · 3 words · 5 tokens
The lab could not load. The summary above still applies.
Open this lab on its own page →If you typed in your own name, you probably saw it split into two or three pieces. To the model, uncommon names are strings of pieces, not a single unit.
Why Break Text into Pieces?
A dictionary containing every word in every language would be enormous, and it would still leave out proper names, slang, and typos. A dictionary of single letters would be tiny, but every sentence would turn into an extremely long line.
Pieces sit in the middle. The best-known technique for building this dictionary is called BPE, short for byte pair encoding. It came out of data compression, was adapted for machine translation in a 2016 paper, and later became the standard for language models. The idea is to start with individual characters and keep merging the pairs that most often appear side by side until the dictionary reaches the size you want. That’s how “mente” (the Portuguese ending that works like “-ly”) becomes a single piece, since it shows up in thousands of adverbs, and how “inconstitucionalmente” (roughly “unconstitutionally”) comes out in four parts: “in”, “constit”, “ucional”, and “mente”.
Does Portuguese Use More Tokens?
Often, yes. Tokenizers are trained on far more English text, so English words tend to turn into fewer pieces. OpenAI’s help center gives a rule of thumb for English: one token is about four characters, and a hundred tokens come to roughly 75 words. The same page warns that other languages usually need more tokens to say the same thing.
But it isn’t a fixed rule. Here are real counts from the same tokenizer:
In practice, this matters in two ways. First, tools that charge by usage bill per token, for both input and output. Second, size limits are also measured in tokens, as you’ll see next.
The Context Window
Every model has a limit on how many tokens it can consider at once. That limit is called the context window, and it covers everything: your messages, the model’s replies, and any files you attached.
When a conversation goes past the limit, the tool has to cut or summarize something, usually the beginning. That’s why, in a very long conversation, the AI can “forget” an instruction you gave way back at the start. Window size varies from model to model and version to version, so check the documentation for the tool you use.
Cautions and Curiosities
Counting letters is hard for AI. If you ask how many “r”s are in a word, the model has to reason about pieces, not letters. That’s why this kind of simple question sometimes comes out wrong.
New topic, new conversation. If you’ve changed subjects, opening a fresh conversation saves tokens and keeps old instructions from getting in the way.
Put the key instruction at the end, too. With very long texts, repeating your main instruction after the material helps keep it from getting lost.
Test What Stuck
Five quick questions to check the main points.
Do you understand tokens?
Question 1 of 5
What does a language model actually receive when you type a sentence?
- The letters, one by one
- A line of numbers that stand for pieces of the text
- A photo of the text
- The words exactly as you typed them
Show answer
Right answer: B. The tokenizer cuts the text into known pieces and swaps each one for a number. The model works with that line of numbers.
The tokenizer cuts the text into known pieces and swaps each one for a number. The model works with that line of numbers.
Question 2 of 5
In the o200k_base tokenizer, how many tokens does "Inteligência artificial" become?
- 1
- 2
- 4
- 23
Show answer
Right answer: C. It becomes four: "Int", "elig", "ência", and " artificial". In English, "Artificial intelligence" becomes only two.
It becomes four: "Int", "elig", "ência", and " artificial". In English, "Artificial intelligence" becomes only two.
Question 3 of 5
Why does AI sometimes make mistakes when counting the letters in a word?
- Because it sees word pieces, not letters
- Because it doesn't know the alphabet
- Because long words are blocked
- Because it only reads English
Show answer
Right answer: A. Since the text arrives as tokens, the AI has to reason about whole pieces. Counting the letters inside them is harder than it looks.
Since the text arrives as tokens, the AI has to reason about whole pieces. Counting the letters inside them is harder than it looks.
Question 4 of 5
What is the context window?
- The size of the app's screen
- The maximum time the AI takes to answer
- The limit of tokens the model considers at once
- The list of languages the AI understands
Show answer
Right answer: C. The window includes your messages, the replies, and any attachments. When the conversation goes past the limit, the tool cuts or summarizes part of it.
The window includes your messages, the replies, and any attachments. When the conversation goes past the limit, the tool cuts or summarizes part of it.
Question 5 of 5
According to OpenAI's rule of thumb for English text, one token is on average about:
- 1 character
- 4 characters
- 10 characters
- A whole sentence
Show answer
Right answer: B. OpenAI's help center says a token is about four characters in English, and that other languages tend to use more tokens.
OpenAI's help center says a token is about four characters in English, and that other languages tend to use more tokens.
The lab could not load. The summary above still applies.
Open this lab on its own page →Keep Reading
References
- OpenAI. What are tokens and how to count them?. Consultado em Nov 28, 2026.
- Sennrich, Rico; Haddow, Barry; Birch, Alexandra. Neural Machine Translation of Rare Words with Subword Units, Proceedings of ACL 2016 (2016).