FREE BROWSER TOOL ยท NO API KEY
tiktokenizer.
Paste text or compose chat messages and see token counts as you type. Choose a model or encoding, then inspect each token and its ID.
TOKEN COUNT
Exact count for the text entered.
Words
0
Characters
0
Token breakdown
Each block is one token. Hover to see its ID and exact text.
HOW IT WORKS
Words and tokens differ.
A token can be a word, part of a word, punctuation, or whitespace. Different encodings can split the same text differently, especially for code and non-English languages.
Text mode counts the exact tokens in the input. Chat mode counts each messageโs content separately; roles and API message framing are excluded, so a full request can use more tokens.
Everything runs locally in your browser. Your text is not sent to a server for counting.
FEATURES
See how your text becomes tokens.
Model-aware counting
Select GPT-4o, GPT-4, GPT-3.5 Turbo, or an encoding directly. The count updates when you change the selection.
Text and chat inputs
Paste a prompt or build a conversation with system, user, and assistant messages. Add, edit, or remove messages as you work.
Inspect every token
See the colored token breakdown and token IDs. Toggle visible whitespace to spot spaces, tabs, and line breaks.
USE CASES
Who uses the tiktokenizer?
Prompt writers
Compare wording and see how a small edit changes the token count before you use a prompt.
App developers
Check message content for a selected model while building chat interfaces or preparing API inputs.
Writers and researchers
Measure long passages, code, or multilingual text before splitting it into smaller pieces.