Tokenization

IntermediateLanguage AI

Last updated August 11, 2026

What is Tokenization in simple terms?

In simple terms, tokenization is the step where an AI chops your text into bite-size pieces it can handle. Before a model reads anything, your words get split into small chunks called tokens, drawn from a fixed set.

Tokenization explained

Tokenization is the process of breaking text into tokens — the small chunks, often whole words or pieces of words, that an AI language model actually reads and works with, since models operate on these units rather than on raw letters or whole sentences.

Tokenization is the conversion step that happens before a language model reads anything at all. A tokenizer — an ordinary piece of software, not the model itself — scans the incoming text and rewrites it as a list of entries from a fixed vocabulary the model was built with, each entry standing for a chunk of characters. What gets handed over is numbers: the identifier of each entry, not the letters. The same machinery runs in reverse on the way out, turning the model's chosen entries back into readable text. No judgment or understanding is involved anywhere in this step; it is a lookup, applied identically every time.

That vocabulary is not written by hand. It is learned in advance from a large sample of text — most commonly by starting from single characters and repeatedly merging the sequences that turn up together most often, until the set reaches its intended size, often tens of thousands of entries. Other tokenizers choose their entries by different criteria, so the specific method varies, but the outcome does not: frequent words end up with an entry of their own, while rare ones have to be assembled from smaller fragments. The size is a deliberate trade. A vocabulary big enough to hold every word would still fail on names and typos it had never met, and one made only of single characters would leave the model with very long sequences and no ready-made word units to work from. A learned middle vocabulary can spell out anything, including text nobody anticipated, by falling back on its smaller pieces.

There is no single correct way to make those cuts, and models do not share one. Each is built with its own tokenizer and its own vocabulary, so the same paragraph can produce a noticeably different count depending on which model you send it to, and a figure measured against one model is only an estimate for another. Model providers generally publish a way to count text against their own tokenizer, which is the only count that applies. The scheme also decides how gracefully a model copes with material its vocabulary was not built around — an unfamiliar writing system, scientific notation, dense code — since all of it has to be reconstructed out of whatever fragments happen to exist.

Real-world example of Tokenization

Imagine watching, in slow motion, what happens the instant you press send on the message "I'll meet you at 3pm 😊". A tokenizer pulls it apart before the model reads a word of it: "I" and "'ll" may split into two tokens, "meet", "you", "at" become tokens of their own, "3" and "pm" might separate, and the smiley face becomes its own single token. What looked to you like one short, simple sentence arrives at the model as a tidy sequence of perhaps eight or nine numbered chunks. The model then does all its work on that sequence and assembles its reply the same way — token by token — before it's stitched back into the readable text you see.

Frequently asked questions about Tokenization

What is the difference between a token and tokenization?

A token is the unit; tokenization is the procedure that produces it. Tokens are what the model reads, and tokenization is the software deciding where the cuts fall, applying a fixed vocabulary settled long before you typed anything. A useful test: if you are asking what a piece of text costs or whether it will fit, that is a question about tokens. If you are asking why one word came out as three pieces, or why two models disagree about the length of the same sentence, that is a question about tokenization.

How does tokenization work?

The tokenizer holds a fixed vocabulary that was learned from a large body of text before the model was trained, most often by repeatedly merging the character sequences that recur together, though the exact method differs from one tokenizer to another. Given new input it scans through and matches the longest pieces it can from that vocabulary, so a common word is captured in one go while an unfamiliar one is covered by several smaller fragments. Whitespace, punctuation and symbols are part of the scheme rather than exceptions to it. The output is an ordered list of vocabulary identifiers — numbers — and that list is what is fed to the model.

Why does tokenization matter for using AI?

Because it is the invisible step that fixes every number downstream. The scheme decides where the cuts fall, so it decides the count, and the count is what your text gets measured by. It is also the origin of an unevenness between languages: a vocabulary learned mostly from English text has ready-made pieces for English and must assemble other writing systems from smaller ones, which is why identical meaning does not measure the same everywhere. For anyone building with these models it is practical as well — splitting a long document sensibly, or sizing a job before running it, means counting against the right tokenizer rather than counting words.