Token Counter

Count tokens and see how text is split, with the real GPT-4o and GPT-4 tokenizers.

Tokens

Examples

Command output

The RTK Output Visualizer counts the tokens in git, ls, grep and test output before and after rtk-style filtering.

Questions

Which models does it count for?

OpenAI models that use o200k_base (GPT-4o, GPT-4.1 and the o-series) or cl100k_base (GPT-4 and GPT-3.5). Claude, Gemini and Llama use their own tokenizers, so their counts differ, often by 10 to 30 percent.

Why does an emoji or Chinese character take several tokens?

Tokenizers work on UTF-8 bytes. A common English word is often one token, but rarer characters that take several bytes are split into pieces. The highlight groups the pieces back into the character.

Is my text uploaded?

No. The tokenizer data (0.5 to 1 MB) downloads once from this site, and counting runs in your browser.