Skip to content

How many tokens is my PDF?

What decides a PDF's token count, measured examples in English, Arabic and a table, and how to count your own file exactly.

By OpenAnyDoc ·

The short answer

There is no fixed number of tokens per page: it depends on how many words the page holds, the language they are in, whether it is mostly tables, and which AI model reads it. In our test, a page of 415 English words came to 467 tokens, the same text in Arabic to 571, and a page holding one table of 40 rows to 889. To know your own file's number, drop it into OpenAnyDoc's Token counter, which counts it in your browser without uploading it.

What a token is

An AI model does not read letters or words. It reads tokens: pieces of text that it treats as one unit. A short common word is often one token, a long or rare word is split into several, and punctuation, numbers and spaces take tokens too.

Counting words is not the same thing. On our English test page below, 415 words came to 467 tokens, a little over one token per word, but that ratio changes from file to file.

Chat limits, file limits and the prices of AI services are counted in tokens. A long conversation also counts everything said before and the answer being written, so a document that only just fits may leave little room for the reply.

Why a page count is a poor guide

"Ten pages" can mean very different amounts of text. We measured three synthetic pages with the same counter the site uses:

  • A report page of plain English prose, 415 words: 467 tokens.
  • The same report written in Arabic, 319 words: 571 tokens, about a fifth more for the same meaning.
  • A page with one table of 40 rows and 5 columns (codes, regions, prices, totals), 247 words: 889 tokens, nearly twice the prose page with fewer words.
  • A scanned page: 0 tokens until text recognition adds its text, because the page is only a picture.

Where the differences come from

Tables cost more because numbers, codes and the | marks between cells are short pieces that are rarely joined into one token. Font size, margins and pictures change how many words fit on a page at all.

Language matters because tokenizers learn their pieces from text, and most of that text is English. English words are often a single token; Arabic words, with their attached prefixes and suffixes, are more often split. That is why the Arabic page above had fewer words but more tokens.

Why the model matters

Every AI model has its own tokenizer, so the same PDF gives a different number in each. OpenAnyDoc counts with one standard tokenizer that some widely used models share. For other models, Claude and Gemini among them, the number is an estimate, usually close but not exact. When a file is near a limit, leave some room rather than relying on the last few hundred tokens.

How to count your own PDF exactly

Token counter reads the file on your device; nothing is sent to a server or to an AI service:

  • Open Token counter and choose your PDF, or drop it on the page. Word, PowerPoint, Excel, CSV, JSON, TXT and Markdown files work too, or you can paste text.
  • The PDF is turned into the same Markdown that PDF to Markdown makes, so you count the text you would actually paste.
  • Read the tokens, words and characters under the text box.
  • The text box can be edited: delete the parts you will not paste and the count updates.

If the number is too high

Send less rather than hoping the chat copes:

  • Keep only the pages you need with Extract PDF pages, then count again.
  • Cut a long report into parts with Split PDF and paste one part at a time, telling the chat to wait until the last part arrives.
  • For lists of records in JSON, JSON to TOON writes the same data in a shorter form.
  • If the count is 0, the PDF is scanned; run OCR PDF first.
  • Tables cost the most, so paste them in a form the chat can read. Giving ChatGPT a PDF without losing the tables shows how.

Questions?

Write to support@openanydoc.com and describe the file and the count you see (no personal data).