Open Find and Replace in Google Docs
To find and replace text in Google Docs, use the keyboard shortcut Ctrl+H on Windows or Cmd+H on Mac. This opens the Find and Replace panel on the right side of your document. You can also reach it through the menu: click Edit at the top, then select Find and replace from the dropdown.
The panel appears as a sidebar with two text boxes stacked vertically. The top box is where you type the text you want to find. The bottom box is where you type the replacement text. Both boxes are empty when you first open the panel, ready for your input.
Key Takeaways
- Use Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace when ready from anywhere in your document.
- Type the text you want to find in the top box and the replacement text in the bottom box, then click Replace All to change every instance at once.
- The "Match case" option makes your search case-sensitive, so "The" will not match "the" unless you turn this on.
- Click the three-dot menu icon in the Find and Replace panel to access additional options like matching whole words only or using regular expressions.
- Use Replace to change one instance at a time, or Replace All to change every matching instance throughout the entire document.
Type Your Search Term and Replacement Text
In the top box labeled "Find," type the exact text you want to search for. This can be a single word, a phrase, or even a string of characters. For example, if you want to replace every instance of "email" with "e-mail," type "email" in the Find box.
In the bottom box labeled "Replace with," type what you want to replace it with. Using the same example, you would type "e-mail" here. Leave this box empty if you want to delete the found text instead of replacing it with something else.
Google Docs searches are not case-sensitive by default, meaning it will find "Email," "email," and "EMAIL" all the same way. If you need to match the exact capitalization, click the three-dot menu icon and turn on Match case.
Replace One Instance or All at Once
Once you have entered your search term and replacement text, you will see buttons appear below the text boxes. The button with a single arrow replaces just the current instance that is highlighted in your document. Click this button to replace one occurrence, then move to the next match.
The Replace All button (usually shown as an icon with multiple arrows or labeled clearly) replaces every instance of your search term throughout the entire document in one action. This is much faster when you know you want to change all occurrences. Google Docs will show you how many replacements it made in a small notification.
If you only want to replace text in a specific section of your document, select that section first before opening Find and Replace. The search will then be limited to your selection.
Use Match Case for Exact Capitalization
By default, Find and Replace ignores capitalization. If you search for "apple," it will find "Apple," "APPLE," and "apple" all the same way. When you replace them, each instance keeps its original capitalization pattern.
To search for an exact match including capitalization, click the three-dot menu icon in the Find and Replace panel and check the Match case box. Now "apple" will only find lowercase "apple," not "Apple" or "APPLE." This is useful when you are replacing proper nouns or when capitalization matters for your document.
Search for Whole Words Only
Sometimes a word appears as part of a larger word, and you only want to replace the standalone version. For example, if you search for "cat," it will also find and potentially replace "cat" inside "category" or "concatenate."
To avoid this, click the three-dot menu and turn on Match entire word only. Now your search will only find "cat" when it stands alone, separated by spaces or punctuation. This prevents accidental replacements in the middle of other words.
Use Regular Expressions for Advanced Searches
Google Docs supports regular expressions, which are patterns that match text in flexible ways. For example, you can search for any number, any letter, or any text that follows a specific pattern. To use this feature, click the three-dot menu and turn on Use regular expressions.
Common regular expression patterns include . (any single character), \d (any digit), \w (any letter or number), and ^ or $ (start or end of a line). For instance, searching for \d{3}-\d{4} would find phone numbers in the format 123-4567. Regular expressions are powerful but take practice to learn; start with straightforward patterns and test them on a copy of your document first.
Close Find and Replace When You Are Done
The Find and Replace panel stays open on the right side of your screen until you close it. Click the X button in the top right corner of the panel to close it, or press Escape on your keyboard. Your document remains unchanged when you close the panel—only the replacements you actually clicked are applied.
If you made a replacement by mistake, use Ctrl+Z (Windows) or Cmd+Z (Mac) to undo it when ready. You can undo multiple replacements this way if needed, even after closing the Find and Replace panel.
Frequently Asked Questions
Will Find and Replace change text inside comments or suggestions?
No. Find and Replace only changes the main text of your document. Comments, suggestions, and tracked changes are not affected. If you need to update text in comments, you must edit them manually.
Can I search for line breaks or special characters?
Yes, if you turn on regular expressions. Use \n to search for line breaks. For other special characters like tabs or dashes, you can often type them directly into the Find box, or use their regular expression codes. Test on a small section first to make sure the pattern works as expected.
What happens if I replace text in a shared document?
The replacements are applied when ready and show up for all collaborators. If others are editing at the same time, Google Docs handles the changes, but it is safer to let collaborators know before you do a Replace All on shared content.
Can I undo a Replace All if I made a mistake?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) right away to undo the last Replace All action. If you have made other edits since then, you may need to undo multiple times. This is why testing on a small section first is a good habit.
Does Find and Replace work the same way in Google Docs on mobile?
The mobile app has a Find feature but not the full Find and Replace panel. For full Find and Replace functionality, use Google Docs in a web browser on a computer or tablet.