Count the tokens in a PDF

Know whether a PDF fits an AI's context window, and what it costs to send, before you upload it.

Processed on your device

or drop a PDF anywhere on this page. Files stay on this device.

How to count the tokens in a PDF

To count the tokens in a PDF, open it here and press Count tokens. Puffin PDF reads the text in your browser and estimates tokens at about four characters per token for English, which is close to how current AI tokenizers count. It shows whether the file fits 8K, 32K, 128K, 200K and 1M token context windows, and the cost to send it at the price per million tokens you type in.

  1. Select a PDF, or drop it on this page.
  2. Press Count tokens.
  3. Check which context windows it fits.
  4. Type your provider's price to see the cost.

Questions and answers

How accurate is the count?

It is an estimate. Each AI model uses its own tokenizer, so real counts usually land within 10 to 20 percent of this figure. Languages such as Chinese and Japanese use more tokens per character, which the estimate allows for.

Why is the count lower than the AI says?

Repeating headers, footers and page numbers are left out, because they add nothing. Some AI tools also add page images to the count when you upload a PDF.

Too big for my AI?

Use Split PDF for AI to cut it into parts that each fit, or PDF to AI-ready Markdown to remove the clutter first.

Are my files uploaded?

No. The work is done by code running in your browser, so your file never leaves your device. You can check this yourself: open your browser's developer tools, switch to the Network tab and run the tool. No request carries your file.

Is it free? Are there limits?

Yes, it is free with no sign-up, no watermark and no daily limit. Because your own device does the work, it costs us almost nothing to run, so there is nothing to meter.

Other tools