Updated
What this token count includes
Choose the exact encoding required by your application. The tokenizer splits your text into UTF-8 byte pieces and merges them using the selected vocabulary. Whitespace, capitalization and punctuation can change the tokens even when the words look similar.
The count covers only the pasted text. It excludes chat roles, system wrappers, tools, images, audio and other request overhead. Encoding names are shown directly so a changing model name does not silently select the wrong vocabulary.
Open the token details to inspect boundaries and IDs. Exported token IDs reconstruct the UTF-8 bytes of the text; the tool checks that match before enabling export. Special-token-looking strings are counted as ordinary text.
A worked example
“hello world” is 2 tokens in both encodings, but the IDs differ: cl100k_base gives [15339, 1917] and o200k_base gives [24912, 2375].
Before you use the result
This is not a billed API-usage count or a context-window guarantee. It supports the two named base encodings only. Tokens may split a Unicode character; an individual preview piece can show a replacement symbol even when the combined bytes are exact. Isolated invalid UTF-16 surrogates normalize to the replacement character.
Cite this page
ToolOctopus. “Token counter.” Updated 2026-09-20. https://tooloctopus.com/token-counter.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. Licence and source code.
