PDF Word Counter
Choose a PDF and every page gets its own word count, character counts with and without spaces, and a preview of the text that was counted. pdf.js reads the text layer in a background worker in this browser, so the file is not uploaded. A page whose text layer is empty, such as a scan, is marked No text layer instead of being counted as zero, and the counting rules are listed under the tool: reading order, what makes a word, and how a hyphen at the end of a line is handled. Pick the pages to include, then download the counts as CSV.
Your PDF
Up to 50 MB and 300 pages, read in this browser. Nothing is uploaded.
Leave empty for every page, or type pages and ranges such as 1-3, 7 or 10-.
Pages
Choose a PDF to count its words page by page.
How pages are read and counted
- Order. Text is taken in the order the PDF draws it, as pdf.js reports it. It is not re-sorted by position, so two columns come out in the order the file stores them.
- Words. A word is a run of characters between spaces or line breaks that holds at least one letter or digit. A hyphenated compound such as well-known is one word; a dash or bullet standing alone is not a word.
- Chinese and Japanese. Each Chinese character, hiragana or katakana counts as one word, because those scripts put no spaces between words.
- Line-end hyphens. Join counts a letter, a hyphen ending the line and a letter starting the next line as one word, and the hyphen stays in the character count. Keep split counts the two parts as separate words.
- Characters. Characters are Unicode code points. No spaces counts every character that is not whitespace; with spaces adds one for each gap between words, line breaks included, however wide the gap is in the PDF. A character the PDF gives no Unicode meaning for is counted and flagged on its page.
- Pages without text. A page whose text layer is empty is marked No text layer and adds nothing. It may be a scan, a picture or a blank page; nothing is read from images. A scan that already went through OCR has a hidden text layer, and that text is counted.
- Selection. Excluded pages still show their own counts but add nothing to the totals or the CSV total row.
- Limits. A PDF of up to 50 MB and 300 pages is read in this browser. Once 10,000,000 characters of text have been read, later pages are marked not read, never counted as zero.
Worked cases
- 8 words total
- 7 words total, page 2 adds 0
- join: 2 words; keep split: 3 words
- No text layer: count unavailable
Common questions
- How does the PDF word counter decide what a word is?
- A word is a run of characters between spaces or line breaks that holds at least one letter or digit, so a hyphenated compound such as well-known is one word and a dash or bullet on its own is not. Each Chinese character, hiragana or katakana counts as one word. The full rules are listed under the tool.
- Why does a page say No text layer instead of 0 words?
- That page has no extractable text: it is usually a scan or a picture of text, or it is blank. This tool does not read text from images, so it marks the page and leaves it out of the totals rather than reporting a misleading zero. Make the file searchable with OCR first, for example with Searchable PDF OCR, then count the new file.
- What does the line-end hyphen setting change?
- With Join, a word broken across two lines with a hyphen, such as self- at the end of one line and driving at the start of the next, counts as one word, and the hyphen still counts as a character. Keep split counts the two parts as separate words. Join is the default, and your choice is remembered in this browser.
- Can I count only some pages?
- Yes. Type pages and ranges such as 1-3, 7 or 10- in Pages to count, or leave it empty for every page. Excluded pages still show their own count, but they add nothing to the totals or to the total row of the CSV.
- Why might my count differ from Microsoft Word or another counter?
- Counts depend on the text the PDF stores. Everything in the text layer is counted, including headers, footers, page numbers and footnotes, and pdf.js takes it in the order the file draws it, so text drawn out of order can run two words together. Open a page to see its text as it was counted.
- What is in the CSV?
- One row per page with whether it is selected, its status, words, characters without and with spaces, line-end hyphens joined and characters with no Unicode meaning, then a total row for the selected pages. Pages without a text layer have empty count cells, not zeros. The CSV holds counts only, not the page text.
- Is my PDF uploaded?
- No. The PDF is read by pdf.js in a background worker in this browser, and the file and its text are not sent anywhere. PDFs up to 50 MB and 300 pages are accepted. Once 10,000,000 characters of text have been read, any later pages are marked not read rather than counted as zero.
Counts extracted text, not OCR; layout/hyphenation can alter tokens. Image-only pages are marked unavailable.