Up to 240 characters. Nothing leaves your browser.
Vocabulary: tokens minted so far
Tokens 0–255 are the raw bytes. Every merge adds one new token on top.
Tokenization is then fixed
Once the merges are learned, any new text is split by replaying them in the same order. Try a word with the vocabulary learned up to the current step:
This page runs real Byte Pair Encoding on the UTF-8 bytes of the text above: in every step it counts all neighbouring pairs, takes the most frequent one (on a tie, the pair that appears first in the text) and replaces it with a new token. It stops when no pair appears twice, or after 80 merges. Real tokenizers do the same on a huge body of text until the vocabulary has roughly 100,000 to 200,000 tokens. To see how a real model splits your text, try Tiktokenizer.