LLM Cost Estimator
Estimate multi-model API cost from tokens or pasted prompts.
OpenPicture how text breaks into token-sized pieces, with every chunk numbered.
Add a sentence, prompt or snippet to inspect.
Text appears as numbered pieces of up to four characters.
The footer shows the approximate token count.
Copy the output into docs or a teaching note.
Explaining tokens to a product manager is easier with something to look at than with a formula. The same goes for spotting why a URL-heavy prompt costs more than it looks. Token Visualizer lays your text out as numbered, token-sized pieces.
Paste text and the output shows it as a sequence of bracketed chunks, each labeled with its index, for example [0:The ] [1:quic]. Each chunk starts at a non-space character and runs up to four characters, which mirrors the common rule that one token is roughly four characters of English. The line at the bottom gives the approximate total using the same characters-divided-by-four heuristic.
This is a teaching and sanity-check tool, not a model tokenizer. Real tokenizers use learned vocabularies, so a common word may be a single token while a rare identifier splits into many. Read the output for proportions: long runs of chunks in IDs, hashes or Base64 are where a prompt quietly gets expensive. For counts with a cost estimate, switch to the Token Counter. If the visualization shows padding and filler, Prompt Trimmer can tidy it up.
The splitting happens with a regular expression in this page, so anything you paste stays local.
Keyboard shortcut
Answers for this tool. For site-wide help, open the FAQ hub.
No. Each model family has its own tokenizer and vocabulary. The visualizer uses fixed four-character chunks so you can reason about scale, not to reproduce exact token boundaries.
A chunk ends after four characters or at the end of the text. Short words at the end of a line, and the final piece of the input, often come out shorter.
Anything with long identifiers, encoded data, stack traces or pasted URLs. Those produce many chunks per visible word and are usually the first thing to shorten or remove from a prompt.