MarkPrep

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.

Drop files, paste, or click to browse
PDF, Word, Excel, PowerPoint, HTML, CSV, JSON, EPUB, images and more. Nothing is uploaded.
Network requests that left this page during conversion: 0We're not asking you to trust a privacy policy. Press F12 → Network and watch.

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.