All Tools / AI Context Tools / Token Counter
Token Counter
How many tokens a file costs, and which context windows it fits
Token Counter is available in the desktop app
This tool relies on native processing for speed, large files, and full offline privacy. Use the desktop app to run it locally with no uploads.
Token Counter shows how many tokens a file costs and which model context windows it fits, before you paste it into a chat. Counts come from the real GPT tokenizer vocabularies, not a characters-divided-by-four guess.
Drop Word, Excel, PowerPoint, PDF, HTML, EPUB, CSV, JSON, XML or text files; each is read the same way Convert to Markdown reads it, so the count matches what you would actually paste.
How To Use Token Counter Offline
- Open AI Context › Token Counter — It sits under Measure in the AI Context section.
- Pick the Token model — GPT-4o / o200k, GPT-4 / cl100k, Claude (closest match) or Rough (chars ÷ 4).
- Drop the files — One or many. Each gets its own row with words and characters.
- Read the bars — Fits in a context window shows 8K, 32K, 128K, 200K and 1M windows; a bar turns amber when the file would overflow it.
Why Use 1FileTool Over Online Tools?
- 100% offline — Files never leave your computer. No uploads, ever.
- Pay once — One-time payment from $29. No monthly subscriptions.
- Instant results — Local processing is faster than uploading + server processing + downloading.
- No file size limits — Process files of any size, limited only by your disk space.
- GDPR compliant — No data collection means complete privacy compliance by design.
Formats
| Input | Output | Notes |
|---|---|---|
| .docx .xlsx .pptx .pdf .html .epub | token count | Read as Markdown first. |
| .csv .json .xml .md .txt | token count | — |
Good to know
- Claude has no public offline tokenizer, so Claude (closest match) is an estimate based on o200k and is marked as one.
- Scanned PDFs without a text layer count as nearly empty; convert them with Read scanned pages first.
Tips
- Leave about 10 to 20 percent of a window free for your question and the answer.
- Too big? Split for Context breaks the document into parts under a token limit, with overlap.
- Your AI assistant can count tokens itself over MCP with filetool_count_tokens.

Amber bars mark the context windows the file would overflow.
Frequently asked questions
Why do counts differ between models?
Each model family uses its own vocabulary. The same text is fewer tokens in o200k (GPT-4o) than in cl100k (GPT-4), for example.
How accurate is the Claude count?
Close enough for budgeting, but an estimate: Anthropic publishes no offline tokenizer, so it is counted with o200k and labelled estimated.
Does counting change or upload my files?
No. The files are only read, on your computer.