What does a GPT tokenizer count?
A GPT tokenizer does not simply count words. It maps text into vocabulary IDs that may represent a word, part of a word, punctuation, leading whitespace, or a byte sequence. The color blocks above make those boundaries inspectable without sending the prompt away.
Turn on Show whitespace when two prompts look identical but produce different counts. Turn on Show token IDs when you are comparing serialization or building a repeatable prompt test. The GPT tokenizer keeps those controls secondary until you need them.
Does a GPT token count include the whole API request?
A production prompt often includes a system instruction, examples, conversation history, tool definitions, and the next user request. Chat mode lets the GPT tokenizer separate message content before adding a visible format estimate.
This distinction matters near a context limit. The GPT tokenizer can show that visible text fits, but tool schemas and expected output still need room. Budget context for the complete request plus the response, not only the pasted paragraph.
When should you inspect GPT token IDs?
Token IDs are useful when a delimiter, product code, URL, or unusual spelling breaks into many pieces. They are not a quality score. A low ID or a visually short token does not mean the model understands it better.
For very large input, the GPT tokenizer avoids rendering every token span. It keeps the total and shows a guarded preview, preventing the visualization itself from becoming the browser bottleneck.
How much does a GPT prompt cost?
Prompt cost depends on the selected GPT model, normal input tokens, eligible cached input, and any generated output. The GPT tokenizer estimates the visible input first; the GPT API cost calculator then applies the current per-million rates from OpenAI's linked pricing page.
Use the GPT tokenizer as the visible-text baseline. Message framing, tools, media, retries, and output can make the complete provider charge higher than the pasted-text estimate.
Related planning tools
Move from token shape to total workload cost, or compare another provider's accuracy boundary.