Estimate how many tokens your text uses for GPT-4o, Claude, Llama, and other LLMs. Updates in real time.
Large language models don't process text character by character or word by word — they work with tokens, which are chunks of characters produced by a process called Byte-Pair Encoding (BPE). BPE merges the most frequent character pairs in a training corpus into single tokens, building a vocabulary of tens of thousands of subword units. For typical English prose, one token is roughly 4 characters or about ¾ of a word. Code tends to be more token-dense (operators, brackets, and short identifiers tokenize inefficiently), while non-Latin scripts like Chinese or Arabic may use 1–3 characters per token because those characters fall outside the common BPE merges trained on English-heavy data. The estimates on this page use the 4 chars/token heuristic — for exact counts use the tiktoken library (OpenAI) or the Anthropic token-counting API endpoint.