How to search for text inside PDF files on your computer
You know a word is in one of your PDFs, but not which one. Here is how to find it by hand on Windows and Mac, and how to ask Key to do it.
Bills, manuals, forms, receipts: PDFs pile up fast. File names like scan0042.pdf do not help when you need the one that mentions a certain name, number or product. The good news is that you can search text in PDF files without opening them one by one.
This guide shows two jobs. First, finding the right PDF among many. Second, finding the word once you have opened a PDF. We start with the steps by hand, then show how to ask Key.
One thing to know first: a PDF made from a scan or a photo is only a picture of a page. It has no real text in it, so no search can read it. If a PDF finds nothing, that may be the reason.
Find the word inside one PDF
If you already have the file open, this is the quick part.
On a Mac, in Preview
- Open the PDF in Preview.
- Click the search field in the toolbar and type the word or phrase.
- Click the Next and Previous buttons to move from match to match.
- When you are done, click the Delete button in the search field to clear it.
If you type a phrase, Preview looks for that exact phrase. To match any of the words instead, click the magnifying glass and choose Any Match. You can also sort the results by Page Order or Search Rank. If you cannot see the search field, make the Preview window a little wider.
On Windows
Windows does not have one built-in PDF viewer that everyone uses. You might have your web browser, Edge or a reader you installed. Open the PDF and look for the viewer's find box. In most of them, Ctrl + F opens it. Type the word and step through the matches.
Find which PDF mentions a word
This is the harder job, and the one most people really want. Both Windows and Mac keep a search index of your files, and that index can include what is written inside them.
On a Mac, with Spotlight
- Press Command + Space bar and start typing the word.
- Look through the results. Press the Space bar on a PDF to preview it with Quick Look, without opening it.
- Press Return to open the one you want.
- To see where it lives, hold Command while you select the result. Finder opens at that file.
Spotlight shows apps, files, emails and messages together, so a common word can bring up a long list. A more unusual word, such as an account number or a street name, works best.
On Windows, with File Explorer
Windows can only search inside a file if it has been set to index the contents, not just the name. Here is how to check.
- Open Settings › Privacy & security › Search.
- Under the Classic option, select Customize search locations.
- In the Indexing Options window, select Advanced, then open the File Types tab.
- Find pdf in the list and choose the option for properties and content, not properties only.
- Click OK and give Windows some time to index. With many files, this can take a while.
Microsoft explains that with properties only, Windows will not look at the contents of the file, so you can search by name but not by what is inside. After indexing, open the folder where your PDFs are, click the search box at the top of File Explorer, and type your word.
Also note that by default the Classic mode indexes your Documents, Pictures and Music folders plus the desktop. A PDF kept somewhere else, such as Downloads, may not be covered unless you add that folder in the same Indexing Options window.
When the by-hand way gets tiring
The steps above work, but they have some catches. You have to set up indexing on Windows. A PDF in an odd folder may be missed. And a short list of results still leaves you opening files to find the right one.
For a related tip that covers all kinds of documents, see How to find a file by what is inside it, on Windows and Mac.
Ask Key to find the PDF
Key is a free assistant for Windows and Mac. It finds files by what is inside them, not just the name, and it reads the document to be sure it found the right one. You can speak or type, and both give the same result.
Say or type what you are looking for, the way you would tell a friend. Half a sentence is enough. Here is an example:
Find the PDF that mentions my router warranty
I found the router manual that mentions the warranty and opened it for you.
While Key works, a small panel shows what it is doing, and you can stop it at any point. If two PDFs match, it asks you which one you meant, so you stay in charge of the choice.
Other things you might say, in the same spirit:
- "Find my March bill"
- "Open the March invoice"
- "Find the electricity bill from March and put it on my Desktop"
Key checks the result before it tells you it is done. If it could not check something, it says so, and a failure comes back as a failure. It also never deletes anything for good: if you ask it to remove a file, that file goes to the Recycle Bin or the Trash.
Tips for better results
- Pick a rare word. A name, a number or a product code narrows things faster than "payment" or "the".
- Check the spelling. Search matches the letters in the PDF, so a small typo can hide the file.
- Remember scans. If a PDF came from a scanner or a phone photo and nothing finds it, the file has no readable text.
- Add the date or the sender. With Key, "the electricity bill from March" gives it more to go on than "the bill".
If your PDFs mostly come from downloads, you may also like How to clean up your Downloads folder without losing anything. A tidy folder makes every kind of search easier.
Which way should you use?
If you search PDFs once in a while and you are on a Mac, Spotlight and Preview are quick and need no setup. On Windows, it is worth taking a few minutes to turn on content indexing for PDFs. And if you would rather just say what you need and let the computer do the looking, ask Key.
Try Key free
Speak to it or type to it. It opens your apps, finds your files and changes your settings, then tells you what it did.
Free, no card. Windows 10 or 11, macOS 11 or newer.