Count tokens for GPT-4o, Claude or Gemini and check if your PDF fits the context window, without uploading it.
Every LLM has a context window, a limit on how much text it can process at once, measured in tokens. A token is roughly three to four characters of English text. Knowing how many tokens are in your PDF before you paste it into a chat or API call helps you avoid silent truncation, plan how to chunk large documents, and estimate API costs.
This tool extracts all text locally and tokenizes it in your browser. It shows exact counts for OpenAI models: o200k_base for GPT-5.x, GPT-4o, and the o-series, and cl100k_base for GPT-4 and GPT-3.5. Claude, Gemini, and other modern models are estimated from those exact counts, because their tokenizers are not published.
Your PDF content is especially sensitive here, because you are probably checking it before handing it to an AI system. PDFShore extracts and tokenizes entirely in your browser. The text never leaves your device and nothing is logged.
The tool computes exact counts for OpenAI models: o200k_base for GPT-5.x, GPT-4o, and the o-series, and cl100k_base for GPT-4 and GPT-3.5 Turbo. Claude and Gemini do not publish browser tokenizers, so those rows are estimates. Use the exact counts for planning and verify with the provider when billing precision matters.
Image content cannot be tokenized directly. If your PDF is a scanned document without an embedded text layer, the count will be very low or zero. Use PDF to Markdown with OCR enabled first to extract a text layer.
Yes, as estimates derived from the exact GPT counts. The Claude row scales the GPT-4 count by about 1.25, since its tokenizer runs denser on English. Gemini, Llama, Mistral, and DeepSeek use tiktoken-class tokenizers, so their counts land in the GPT-4o to GPT-4 range shown. For billing precision, check the provider's own counter.
A text-heavy A4 or letter page usually runs about 300 to 700 tokens, and 500 is a safe planning number. Dense tables, code, or other languages push it higher, so counting your actual file beats any per-page rule.
No. In English a token averages about three quarters of a word, so a PDF almost always has more tokens than words. Numbers, punctuation, and uncommon words split into extra tokens, which is why the token total sits above the word count.