Token counter for documents
Drop a PDF, Word doc or spreadsheet and see its exact token count for GPT — and a labelled estimate for Claude and Gemini — before you paste.
Most token counters take pasted text. This one takes the actual file: it converts your PDF, DOCX, XLSX, PPTX or HTML to Markdown in your browser and counts the tokens the same way your model will. OpenAI counts are exact via the published tokenizer; Claude and Gemini are approximated and clearly labelled. Switch models and the verdict — fits or doesn't fit — updates instantly. Nothing is uploaded.
Frequently asked questions
Which models are supported?+
GPT-4o and o-series (exact), plus Claude Opus/Sonnet/Haiku and Gemini Pro/Flash (labelled approximations). Switch models from the dropdown and the fit verdict updates.
Is it exact?+
Exact for OpenAI models via their published tokenizer (gpt-tokenizer). Claude and Gemini don't publish tokenizers, so we show a clearly labelled estimate.
Does my file upload?+
No. The file is converted and counted entirely in your browser. Open the Network tab and watch — nothing leaves the page.
What if it doesn't fit?+
You get a red verdict and a chunk plan: heading-aware boundaries you can see and export as JSONL for your pipeline.