Use Command+F to open the search box in almost any Mac document
Press Command+F (the Command key and the letter F at the same time) to open a search box in your document. A small window appears, usually at the top or side of your screen depending on which program you are using. Type the word or phrase you want to find, and the program highlights every match in your document.
This works in most Mac programs: Pages, Microsoft Word, Google Docs, PDF readers, web browsers, and many others. The search box stays open until you close it by pressing Escape or clicking the X button.
If you search for a word that appears multiple times, the program highlights all instances. You can move between them using the arrow buttons in the search box, or by pressing Enter to jump to the next match and Shift+Enter to jump to the previous one.
Key Takeaways
- Command+F opens a search box in nearly every Mac document and web page, letting you find text when ready without scrolling.
- The search highlights every match in the document, and you can navigate between them using arrow buttons or Enter and Shift+Enter.
- Most programs let you search for whole phrases, and some offer options to match capitalization or search only whole words.
- If Command+F does not work in a program, check the Edit menu for a Find option, which usually opens the same search function.
- PDF readers and web browsers often have additional search features like highlighting all matches in different colors or showing match counts.
How to search in different document types
The search function works the same way across most programs, but the location of the search box and the available options vary slightly. In Pages (Apple's word processor), Command+F opens a search box at the top right of the document. In Microsoft Word, the search box appears on the right side and shows how many matches exist in the document.
In Google Docs, Command+F opens a search box in the top right corner. Google Docs also shows a count of matches and lets you navigate between them. If you want to replace text as well as find it, press Command+H instead to open Find and Replace.
For PDF files, the search box location depends on which PDF reader you use. Preview (Apple's built-in PDF reader) shows the search box at the top of the window. Adobe Acrobat Reader shows it on the right side. Both highlight all matches and let you move between them.
Using Find and Replace to change text quickly
If you need to find a word and change it throughout your document, use Find and Replace instead of just Find. Press Command+H to open Find and Replace in most Mac programs including Pages, Word, and Google Docs.
A dialog box appears with two fields: one for the text you want to find and one for the text you want to replace it with. Type the word you want to remove or change in the first field, type what you want instead in the second field, and then click "Replace All" to change every instance at once. If you want to review each change before it happens, click "Replace" one at a time instead.
Be careful with Replace All on common words. If you search for "the" and replace it with something else, you will change every instance of that word in the entire document, including places where you did not intend to change it.
Search options that narrow your results
Many Mac programs offer additional search options that help you find exactly what you are looking for. In Microsoft Word, you can click the arrow next to the search box to reveal options like "Match Case" (which finds only uppercase or lowercase matches) and "Whole Words" (which finds only complete words, not parts of words).
In Google Docs, the search box shows a settings icon (three dots or a gear) that lets you choose whether to match capitalization. If you search for "John" with Match Case on, it will not find "john" or "JOHN".
PDF readers often have a "Highlight All" option that marks every match in a different color, making it easier to see how many times a word appears across multiple pages. Some also show a page number next to each match, so you can jump directly to the page you want.
What to do if Command+F does not work
If pressing Command+F does not open a search box, the program you are using may not support the standard keyboard shortcut. Check the menu bar at the top of the screen and look for the Edit menu. Click Edit and look for an option called "Find" or "Find and Replace". Click it to open the search function.
Some older programs or specialized software may use different keyboard shortcuts. If you cannot find a Find option in the Edit menu, check the Help menu or the program's documentation to learn the correct shortcut.
Web browsers like Safari, Chrome, and Firefox all support Command+F. If it does not work in a web browser, make sure you are clicking inside the webpage itself before pressing the shortcut. Clicking on the browser's toolbar or address bar first may prevent the shortcut from working.
Searching across multiple pages and long documents
When you search in a long document with many pages, the search function shows you how many matches exist and which one you are currently viewing. In Microsoft Word, the search box displays "1 of 47" if your search term appears 47 times in the document. Use the arrow buttons to move forward and backward through the matches.
In Google Docs, the search box shows a count of matches and highlights the current match in a different color than the others. This makes it straightforward to see at a glance how common a word is in your document and where you are in the list of matches.
For very long documents, searching is much faster than scrolling. If you are looking for a specific section or a word you remember but cannot locate by eye, search for a distinctive phrase from that section instead of scrolling through dozens of pages.
Searching in web browsers and online documents
Command+F works the same way in web browsers as it does in documents. Press Command+F while viewing a webpage in Safari, Chrome, or Firefox to search for text on that page. The browser highlights every match and shows you how many times the search term appears.
In Safari, the search box appears at the bottom of the screen. In Chrome and Firefox, it appears at the top right. All three browsers let you navigate between matches using arrow buttons or by pressing Enter to go to the next match.
Keep in mind that searching on a webpage only finds text that is currently visible on the page. If a website loads content as you scroll (common on social media and news sites), searching will not find text that has not loaded yet. Scroll down to load more content, then search again.
Frequently Asked Questions
Can I search for text that spans multiple lines?
Most Mac programs do not support searching for line breaks or paragraph marks using Command+F. If you need to find text that appears on different lines, search for a distinctive phrase from that section instead. In Microsoft Word and Google Docs, you can use Find and Replace with special characters if you need to search for specific formatting.
How do I search for special characters like asterisks or question marks?
In most programs, you can search for special characters by typing them directly into the search box. If the character does not work, try putting a backslash before it (for example, \* for an asterisk). Some programs treat certain characters as wildcards, so check the program's Help menu if your search does not return results.
Does searching in a document use the same shortcut as searching the web?
Yes. Command+F opens search in documents, web browsers, and most other Mac programs. The function works the same way everywhere, though the location of the search box and the available options may differ slightly between programs.
Can I search for text in a document I do not have open?
No. You must open the document first before you can search inside it. If you need to find a document that contains a specific word, use Spotlight (Command+Space) to search your entire Mac for files by name, but this does not search the contents of documents.
What is the difference between Find and Find and Replace?
Find (Command+F) lets you locate text in a document. Find and Replace (Command+H) lets you locate text and change it to something else. Use Find and Replace when you want to update multiple instances of a word or phrase throughout your document at once.