← Back

PDF Search

Search text inside a PDF and locate the page number

This only searches text that truly exists in the PDF — a scanned (image-based) PDF has no text layer and can't be searched. Everything is processed locally in your browser; your file is never uploaded.

About PDF Search

This tool searches a PDF for a keyword and tells you which pages contain it, how many times it appears on each of those pages, and a short snippet of the surrounding text. It first reads the text layer of the whole file, then matches as you type. It is therefore only useful for PDFs that contain real text; scanned or image-only PDFs have no text layer and return nothing. It is a lightweight way to find out which page to look at. It does not highlight the keyword in the original file, and it does not support regular expressions or combining several keywords.

How to use it

  1. Click the dashed box that says Click to select a PDF file and choose the PDF to search. Reading starts automatically and shows Reading file content… while it works.
  2. When reading is finished, a search box appears with a label like Search within this N-page file, where N is the page count.
  3. Type a keyword. Results update as you type; there is no need to press Enter.
  4. Read the heading Search results (N pages matched). Each result card shows a page number, the number of occurrences, and snippets of about 30 characters either side of each match (up to 3 per page), with ellipses where the snippet is cut off.
  5. Note the page numbers and go to those pages in your PDF viewer. When nothing matches, the page shows No matching content found.

A real search example

The following was produced by running the same matching logic as the page on a three-page test file we generated. Page 1 contains Invoice Summary Total due: 120 USD. Please pay the invoice. Page 2 contains Appendix No invoice here? Invoice again. Page 3 is blank. Searching for invoice reported 2 pages matched. Page 1 showed 2 occurrences with the snippet Invoice Summary Total due: 120 USD. P… and page 2 showed 2 occurrences with the snippet Appendix No invoice here? Invoice again. The blank page 3 was not listed. Notice that matching ignores case, so both Invoice and invoice were counted.

Limits and known quirks

  • Matching ignores case and works on literal text. There are no wildcards, regular expressions, multiple keywords or whole-word matching. Special characters in your input are treated as ordinary characters.
  • Each page shows at most the first 3 non-overlapping snippets (about 30 characters either side). Later matches, and matches too close to a previous snippet, appear only in the number of occurrences.
  • Text is assembled from the PDF's internal fragments: no space is added next to Chinese, Japanese or Korean characters, a single space is added between other fragments, and runs of whitespace collapse to one space. A PDF that splits a word into many tiny pieces may still defeat a whole-word search; try a shorter keyword.
  • Scanned and image-only PDFs have no text layer. Reading does not fail; every keyword simply gives No matching content found.
  • There is no highlighting or jump-to-page in the original file, and results cannot be exported.
  • Password-protected or damaged files show: Could not read this file's text content, it may be a scanned PDF with no real text layer. That wording does not necessarily mean the file is a scan; it may simply be unreadable.
  • Files with many pages are slow to read because every page has to be parsed.

Why can't I find a word that I can see on the page?

There are three common causes. The file may really be a scanned image. The word may be split into several fragments inside the PDF, so joining them adds a space in the middle. Or the characters you see may differ from those stored in the file, for example because of a special font or ligatures. Try a shorter keyword, or search for just part of the word.

How is the occurrence count calculated?

It counts how many times the keyword, ignoring case, appears in all the text of that page. It counts string matches, not words. Searching for art, for example, also counts the art inside start and party. Overlapping matches are counted as the regular expression engine scans, which normally means one after another without overlap.

How is this different from the search in my browser or viewer?

Ctrl+F in a browser or viewer highlights matches directly on the page. This tool lists every matching page and its count at once, which helps when you need to find the relevant pages in a long file. After you have the page numbers, you will still need to search again in your viewer if you want highlighting.

Privacy and processing

The file you choose is read in your browser and its text is parsed by the bundled pdf.js component. The page contains no code that uploads the file or your search terms. The extracted text and your keyword live only in the memory of the current page and are cleared when you refresh or close it.