Tool
Token and PDF counter
Counts the tokens in text you paste or in text extracted from a PDF. It shows how much of a context length that text uses after room for instructions and the reply.
Count your text
Files and text stay in this tab. Only the tokenizer files are downloaded. Closing or reloading this page clears your text.
Counted with the Qwen3 tokenizer. Choose the model you will run for its own count.
Count your app’s instructions, message formatting and earlier messages in the reserve. Image, audio and video inputs are not counted.
Leave room for instructions and an answer
These are token amounts. Use the context length actually enabled in your app. Include system instructions, chat formatting, reasoning, and earlier messages in the reserves.
Count your text to see the result.
What does a token count tell you?
A token is a piece of text used by a model. It can be a word, part of a word, punctuation, or whitespace. Different model families count the same text differently, especially code and languages other than English. Choose the model you will run for its own count.
For example, “Hello world, this is a short test.” counts as 9 tokens. With a 4,096-token context, 256 tokens kept for your instructions and 512 for the answer, 3,319 tokens remain for more text (4,096 − 256 − 512 − 9).
How to check whether a document will fit
- Choose the model you will run, or leave it undecided to count with the Qwen3 tokenizer.
- Paste text or choose a text PDF.
- Enter the context length enabled in your app and allow space for your instructions, earlier messages, and the answer.
- If the total is too large, split the document or use a document-search workflow that retrieves relevant passages.
The counter runs in your browser. It downloads tokenizer files from this website and sends neither your document nor your text to a model provider. Shared links contain settings only. Scanned, encrypted, damaged, and partly extractable PDFs are reported as such.
After a count, the page shows the context your text needs and links that carry it and your chosen model to the memory calculator and the setup recommender. Read the context-window guide, or follow the local PDF chat setup.
