token labINTERACTIVE EXPLAINER● Saved on this device
LANGUAGE, UNDER THE HOOD

Words in. Numbers out.

A tokenizer turns text into pieces, then looks up a number for each piece.
Build your vocabulary and watch it happen, one keystroke at a time.

01 Define your vocabulary→02 Type some text→03 Explore the tokens

01 Vocabulary

Your dictionary of tokens and their unique IDs.

TOKENID
Click a token to edit

Starts with 1,000 words from the Google English frequency list ↗. IDs are assigned by rank. [UNK] = 0 is reserved.

02 Input text

03 Tokenized output

● LIVE
0TOKENS
0UNIQUE IDs
0UNKNOWN
Token above · ID below
● In vocabulary● Unknown tokenSpaces are skipped

What’s happening here? +

Each token is a piece of text with a unique integer ID. In Whole words mode, words (including internal apostrophes) and punctuation are looked up individually. In Longest match mode, the longest vocabulary entry at the current position wins; unmatched characters become individual unknown tokens. Spaces are skipped unless included inside a matched token. Matching ignores case by default. Unknown pieces use the reserved ID 0.

This is a teaching tokenizer. Production tokenizers often learn subword vocabularies with methods such as BPE and may encode whitespace too. The IDs here are your own dictionary, not a specific model’s IDs.