Count tokens for ChatGPT, Claude or Gemini and check if your PDF fits the context window, without uploading it.
Compare measured tokens per PDF page, learn why PDF token counts and AI bills differ, or see whether converting to Markdown really saves tokens.
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. OpenAI hasn't documented the GPT-6 encoding, so for GPT-6 the o200k count is the best available estimate, not an exact number. 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. GPT-6's encoding isn't documented yet, so treat its o200k count as an estimate. 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. Counts cover the text this tool extracts, with text pieces joined by spaces. On three public test PDFs, collapsing extra spaces lowered the count by about 5% to 15%, so the figures lean high.
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. The Claude row multiplies the GPT-4 count by 1.25, a rough rule of thumb rather than a published figure. Gemini, Llama, Mistral, and DeepSeek each use their own tokenizer, so we show the GPT-4o to GPT-4 range as a ballpark. For exact numbers, Anthropic and Google both offer token-counting endpoints in their APIs.
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.