Ploba logo

Find the right AI tool for the job: apps, agents, APIs, MCP servers and datasets, explained plainly.

Get the AI Digest

Discover

  • Explore
  • Top Charts
  • Categories
  • Agents
  • MCP servers
  • Developer tools

Learn & community

  • Learn AI
  • AI Glossary
  • Blog
  • Hackathons
  • People
  • AI Digest

For makers

  • List your tool
  • Docs
  • Claim a listing
  • Advertise
  • Write for us

Company

  • About
  • Careers
  • Changelog
  • Trust
  • Security
  • Contact

© 2026 Ploba. All rights reserved.

  • Privacy
  • Terms
  • Cookies
  • Advertising
  • All policies
llms.txt
AI glossary
Generative AI

Tokenizer

Also called Tokeniser, Byte-pair encoding, BPE

The part of an AI system that splits text into tokens, the small pieces a language model reads and writes, and turns them into numbers.

What is a tokenizer?

A tokenizer is the component that turns text into tokens before a large language model sees it, and turns tokens back into text afterwards. A token might be a whole common word ("the"), part of a word ("tok" + "enizer"), a space, a punctuation mark or a single character. Each token has an ID number, and those numbers are what the model actually works with.

How does it work?

Most modern tokenizers use a method such as byte-pair encoding. Before training, the tokenizer studies a large amount of text and builds a fixed vocabulary, often tens of thousands of tokens or more: frequent words get a single token, while rare words are built from several pieces. Every model family has its own tokenizer, and the model can only read text split by that tokenizer.

What is it commonly confused with?

  • Words. Tokens aren't words. In English, a rough guide is about four characters, or three-quarters of a word, per token, but this varies by model and content.
  • Chunking. Chunking splits documents into passages for search. Tokenizing splits text into the tiny units a model reads.

Why does it matter?

The tokenizer decides how many tokens your text becomes, and tokens decide what you pay (inference cost) and how much fits in the context window. The same text can be a different number of tokens in different models. Languages other than English, code and numbers often need more tokens per word, so they cost more and fill the window faster. Tokenization also explains some odd mistakes, such as models miscounting letters in a word they see as just one or two tokens.

Category
Generative AI
Last reviewed
Nov 3, 2026
Also called
Tokeniser, Byte-pair encoding, BPE

Sources

  • Hugging Face: Summary of the tokenizers
  • OpenAI: tiktoken

Related terms

  • Generative AITokenThe basic unit of data—often a part of a word—that an AI model processes.
  • ModelsLarge Language ModelA deep learning model trained on vast amounts of text to understand, generate, and predict human language.
  • Generative AIContext WindowThe maximum amount of information, measured in tokens, that a model can process within one interaction.
  • DevelopmentInference CostWhat it costs to run an AI model on each request, usually priced per million input and output tokens through an API.
  • DevelopmentNatural Language ProcessingA branch of AI focused on giving computers the ability to understand text and spoken words.

Read more on Learn

All articles
  • Illustration of developer integrating API code on a computer screenRoundups · Mar 26, 202610 Best AI APIs for Developers in 2026Compare the best AI APIs for developers to integrate language models, image generation, and audio into your applications.