Open the Find and Replace tool
The fastest way to find and replace text in Google Docs is to use the keyboard shortcut Ctrl+H (Windows) or Cmd+H (Mac). This opens the Find and Replace panel on the right side of your document. If the keyboard shortcut does not work on your device, you can also click the menu: go to Edit at the top, then select Find and replace from the dropdown.
The panel that appears has two text boxes stacked vertically. The top box is labeled Find and the bottom is labeled Replace with. You will type the text you want to search for in the top box and the replacement text in the bottom box.
Key Takeaways
- Use Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace, or go to Edit menu and select Find and replace.
- 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.
- Use the Match case option if you need to distinguish between uppercase and lowercase letters, such as when replacing a name spelled differently.
- The tool shows you how many matches it found before you replace anything, so you can catch mistakes before they affect your whole document.
- Click the down arrow next to the Find box to access additional options like matching whole words only or using regular expressions for complex searches.
Type your search term and replacement text
In the Find box, type the exact text you want to search for. For example, if you want to replace every instance of "colour" with "color", type "colour" in the Find box. Be precise—if you type "colour " with a space after it, the tool will only find instances with that space, and it will skip "colour" at the end of a sentence.
In the Replace with box, type what you want to replace it with. Using the same example, you would type "color". You can leave this box empty if you want to delete the search term instead of replacing it with something else.
Review the match count before replacing
After you type your search term, Google Docs shows you how many matches it found in a small counter next to the Find box. Read this number carefully—it tells you how many changes will happen if you click Replace All. This is your chance to catch a mistake before it spreads through your entire document.
For example, if you meant to replace "the" with "that" but the counter shows 47 matches, you might realize that is too many and that you should use a more specific search term instead. You can also click the up and down arrows next to the counter to jump through each match one at a time and see them highlighted in your document.
Choose between Replace and Replace All
Once you have entered your search term and replacement text, you have two options. The Replace button (a single arrow icon) replaces only the currently highlighted match. Use this when you want to change some instances but not all—for example, if you want to replace "bank" with "financial institution" only when it refers to a money bank, not a river bank.
The Replace All button (a double arrow icon) replaces every match in the document at once. This is faster when you are confident the replacement should happen everywhere, such as fixing a misspelled name throughout a long document. After you click Replace All, Google Docs tells you how many replacements it made.
Use Match case to distinguish uppercase from lowercase
By default, Google Docs treats uppercase and lowercase letters the same way. If you search for "john", it will find "John", "JOHN", and "john" all together. If you need to distinguish between them—for instance, replacing only the lowercase "john" with "Jonathan"—click the three-dot menu icon next to the Find box and check the Match case option.
With Match case turned on, your search becomes case-sensitive. Now searching for "john" will find only "john" and skip "John" or "JOHN". This is useful when you are working with code, technical terms, or proper nouns where capitalization matters.
Search for whole words only
Sometimes a word you want to replace appears as part of a longer word, and you want to skip those instances. For example, if you search for "cat", the tool will find "cat", "cats", "category", and "concatenate" all at once. To find only the standalone word "cat", click the three-dot menu and check Match entire cell contents (in Sheets) or look for the whole-word option in Docs.
This option is especially helpful when you are replacing short words or abbreviations. If you want to replace "PC" with "personal computer" but your document also contains "PCs" and "PCB", using the whole-word option lets you control exactly which instances change.
Close the Find and Replace panel
After you finish replacing text, close the Find and Replace panel by clicking the X button in the top right corner of the panel, or press Escape on your keyboard. Your document remains open with all the replacements made. If you made a mistake, you can undo the replacements by pressing Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after closing the panel.
Google Docs keeps a history of your recent searches in the Find and Replace panel, so if you need to search for the same term again later, it will appear in a dropdown when you click in the Find box.
Frequently Asked Questions
Can I undo a Replace All if I made a mistake?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) right after you close the Find and Replace panel to undo all the replacements at once. If you have made other edits since then, you may need to press undo multiple times to get back to before the replacement happened.
What if I want to replace text that spans multiple lines?
Google Docs Find and Replace works with text that includes line breaks. Type your search term normally in the Find box, and the tool will locate it even if it wraps across lines in your document. The replacement will preserve the line breaks in the same places.
Does Find and Replace work in shared documents?
Yes, Find and Replace works in documents you own and in documents shared with you, as long as you have editing permission. If you only have viewing permission, the Find and Replace tool will not appear. The replacements are tracked like any other edit, so collaborators can see what changed.
Can I search for special characters or punctuation?
Yes. Type the punctuation mark or special character directly into the Find box just as you would any other text. For example, to replace all em dashes with hyphens, type the em dash in the Find box and a hyphen in the Replace with box. Google Docs treats punctuation as regular text in standard Find and Replace mode.
What is the difference between Find and Replace and the regular Find function?
The regular Find function (Ctrl+F or Cmd+F) only searches for text and highlights matches—it does not replace anything. Find and Replace (Ctrl+H or Cmd+H) does both: it finds text and lets you change it. Use Find when you just want to locate something; use Find and Replace when you want to change it.