← AI ChannelInside AIChapter 25 / 255日本語

Volume 1 / Part 3 Mechanics — What Happens Inside / Chapter 25

Tokens — AI Doesn't Read Words. It Reads "Fragments."

About 6 min read

Ever pasted a long block of text into ChatGPT and gotten a "too long" error, even though you counted the characters yourself? The mismatch isn't a glitch. The key to solving it is the "token" — the small fragment that AI actually reads instead of words.

You counted the characters. So why does it say "too long"?

Last time, we talked about how AI training is really just "turning a dial to reduce mistakes." But before that dial even starts turning, how does AI "read" our text in the first place?

Try this: copy some text you like and run it through a character counter. Then paste that same text into a generative AI tool like ChatGPT. You'll notice the character count and the AI's sense of its own limit don't quite line up.

That's not a bug. It's because AI doesn't handle text in units of "characters" or "words" at all. It uses a different unit entirely, called a token.

Think of a jigsaw puzzle. Once it's assembled, you can see the landscape or the people in the picture. But inside the box, all you have are individual pieces. Text works the same way for AI: what it receives first is a pile of fragments, and meaning gets built up from there.

A token is a "fragment" — not a word, not a character

A token is a middle-ground unit. Sometimes it's a whole word, sometimes just part of a word, and sometimes a single character. OpenAI itself describes tokens as "neither words nor characters, but something in between" (Konasense, published 2024).

A short, common word like "Hello" usually fits into a single token. But a long, rare word like "supercalifragilisticexpialidocious" gets chopped into several pieces (this example comes from a BOC Group support article).

Think of cooking. A token is like a bite-sized piece of chopped vegetable. Nobody tosses a whole leek into the pot uncut — you slice it into pieces you can actually chew. AI does the same thing with text: it doesn't swallow a sentence whole, it chops it into pieces it can actually process.

Even emoji or symbols that carry no literal word-meaning can get bundled into a single token, depending on the tokenizer (again, from the BOC Group support article). The key point: whatever characters come in, they always get converted into some kind of fragment.

Remember this

A token is neither a word nor a character. Remember it as a "subword" — something in between.

The tokenizer turns sentences into a string of IDs

The part of the system that does this "chopping" is called a tokenizer. It takes in a sentence and checks it against a pre-built vocabulary, then slices the text into fragments.

After slicing, each fragment gets assigned a number. Inside the AI, the word "hello" doesn't exist as literal text — it exists as something like an ID sequence, say "1234, 5678." Only once a sentence has been converted into a string of numbers can it actually be fed into the AI's internal calculations.

The most widely used method for this splitting is BPE (Byte Pair Encoding). BPE builds its vocabulary by repeatedly merging the most frequent pairs of characters or fragments, and it's the method used in pretraining OpenAI's GPT-series models (the implementation is public in OpenAI's official tiktoken library). BPE is reversible, too — you can reconstruct the original text from a sequence of tokens.

Picture a library's shelving system. Searching for a book by its title directly is slow and awkward, but if every book has a call number, you can find it fast. Converting sentences into number sequences serves the same purpose for a tokenizer: it makes computation faster and more precise.

1 token ≈ 0.75 words — but that ratio can break down

So how much text does one token actually represent? For English text, OpenAI's official documentation gives the rule of thumb: 1 token ≈ 4 characters ≈ 0.75 words. In other words, a 100-word English sentence comes out to roughly 133 tokens.

But that's just a rough guide. Code, URLs, strings of digits, and emoji tend to burn through more tokens than their character count would suggest. If you work with technical documents regularly, you've probably felt this firsthand.

Here's the catch: that 0.75-words-per-token ratio doesn't hold universally. It's calibrated for typical English prose. Text full of symbols, like source code, or text in languages other than English, can throw the ratio off considerably. Japanese, which we'll cover in the next article, is a prime example of where this ratio breaks down.

Try this yourself: pull a sentence from an email or report you wrote, count the words, and divide by 0.75. That gives you a rough estimate of how many tokens it'll cost when you feed it to an AI. If the real number is way off from your estimate, that's a clue about how many symbols or proper nouns are packed into that sentence.

Tokens are also the unit for billing and context length

Tokens matter not just as an internal processing unit, but as the actual yardstick we use when working with AI. For text-generation models, the combined token count of your input prompt and the output text can't exceed a maximum context length set for each model (this rule is spelled out explicitly in OpenAI's Developer Docs).

If you keep a conversation going long enough, eventually the AI will tell you it can't continue. That's not a character limit — it's a sign you've hit the token limit. That opening scenario, where a long paste gets rejected, comes down to exactly this.

Many API services also calculate usage fees based on token counts. Picture a small cost accruing every time a single fragment gets processed. The exact rate varies by service and model, so it's worth checking the provider's official pricing page before you rely on it.

Think of a taxi meter. The fare climbs with every bit of distance traveled, but passengers don't consciously track "how many meters have we gone now?" Token-based billing works similarly — fragments are being counted one by one behind the scenes, while we get to focus on the conversation itself.

Remember this

A token is both the unit you "read" in and the unit you "pay" in — and the unit that measures how long a conversation can run.

Every model has its own tokenizer

Here's a fact that's easy to overlook: tokenizers differ from model to model. Feed the exact same sentence into two different models, and you can get two different token counts.

GPT-4 and GPT-3.5-Turbo, for instance, use a tokenizer built on a vocabulary called cl100k_base (around 100,000 entries). GPT-4o and the GPT-5 series use a larger vocabulary called o200k_base (around 200,000 entries), as summarized in an explainer from inventivehq. OpenAI's models and models from other companies can even use entirely different tokenizer families.

Going back further, GPT-2's tokenizer used byte-level BPE with a vocabulary size of exactly 50,257. That breaks down into 256 base byte tokens, 50,000 merges, and 1 special token (this figure appears repeatedly across technical papers on arXiv). Operating at the byte level meant any string of characters — even ones never seen before — could be handled without needing a special "unknown word" symbol. It was a quiet but important design choice that let the model cope with emoji and mixed-language text alike.

The difference between tokenizers is a bit like the difference between meters and yards. The same real-world distance gets expressed as different numbers depending on which unit system you use. When comparing AI models, don't jump to conclusions like "this model is more efficient" just by looking at token counts. It's worth checking which tokenizer each model relies on first.

FAQ

What's the difference between a token and a word?

A word is a unit of meaning in language, while a token is the unit an AI uses internally for processing. Short words often fit into a single token, but long or unusual words can get split across several tokens.

What is BPE?

BPE (Byte Pair Encoding) is an algorithm that builds a vocabulary by repeatedly merging the most frequent pairs of characters or fragments. It's the tokenization method used in pretraining OpenAI's GPT-series models.

Why does the token count differ between models?

Because each model uses its own tokenizer and vocabulary. For example, the GPT-4 family and the GPT-4o family rely on different vocabularies with different sizes and compositions.

Tokens turn out to be surprisingly deep even for English. So what actually happens when AI reads Japanese text? Next time, we'll look at why Japanese tends to burn through so many more tokens.

Primary sources

This article organizes general knowledge based on our experience and public sources. Product specs, prices, and regulations reflect the time of writing (October 5, 2026) and may change.