Tokenizer Playground

See exactly how your text is split into tokens, piece by piece, across OpenAI's tiktoken encodings. Switch encodings, reveal the token IDs, and watch the count change. Everything runs in your browser.

Try
0
Tokens
44
Characters
Chars / token
Runs in your browser. Nothing is uploaded.

Frequently asked

What does a tokenizer do?

A tokenizer splits text into the sub-word pieces a language model actually reads. Each piece is one token. Common words are often a single token, while rare words, code, numbers and emoji break into several. This playground shows every split so you can see it directly.

Which tokenizers can I try?

Four of OpenAI's real tiktoken encodings: o200k_base (GPT-5, GPT-4o, GPT-4.1 and the o-series), cl100k_base (GPT-4 and GPT-3.5 Turbo), p50k_base (Codex and older text-davinci models) and r50k_base (the original GPT-3 and GPT-2). Switch between them to see how the same text tokenizes differently.

What are token IDs?

Each token maps to an integer ID in the model's vocabulary. The Token IDs view shows the exact numbers the model sees, the same values the API works with under the hood. Whitespace is shown with · for spaces, ⏎ for newlines and ⇥ for tabs.

Is this exact, and is my text private?

The counts are exact for these OpenAI encodings, because it runs the real tiktoken ranks in your browser. Your text is never uploaded, it stays entirely on your device. Claude and Gemini use their own tokenizers, which are not openly available for exact browser-side counting.