Your text stays in this browser. Nothing you paste is uploaded.
Tokenizer and API totals may differ when request formatting or model-specific processing adds tokens.
Count plain-text tokens with current or legacy OpenAI encodings, then inspect each token boundary and ID in your browser.
Your text stays in this browser. Nothing you paste is uploaded.
Tokenizer and API totals may differ when request formatting or model-specific processing adds tokens.
This page runs the selected OpenAI text encoding locally in your browser and returns its token boundaries and token IDs.
Only the text you enter is encoded. API message formatting, tools, images, and other request fields can add tokens.
For request-volume and output-token calculations, see the monthly LLM API cost guide. Using OpenAI? Check the current OpenAI API token prices.
To compare the same English, Chinese, JSON, and code samples, open the reproducible tokenizer comparison.
OpenAI TokenizerHigh confidenceChecked 2026-07-19
StackLens runs matching OpenAI text encodings locally through js-tiktoken. API message formatting and non-text request fields are outside this plain-text count.
The page is delivered online, but tokenization runs locally in your browser. StackLens does not upload the text you enter.
Yes. The Text and Token IDs views show the pieces and numeric IDs produced by the selected OpenAI encoding.
This tool encodes only the text you paste. API messages, roles, tools, images, and other request fields can add tokens.
They select different OpenAI text encodings. The same text can produce different boundaries and IDs, so use the encoding that matches the model family you are evaluating.