Open Find and Replace with a keyboard shortcut
The fastest way to find and replace text in Google Docs is to use Ctrl+H on Windows or Cmd+H on Mac. This opens the Find and Replace panel on the right side of your document. You do not need to select any text first — the tool searches the entire document automatically.
If the keyboard shortcut does not work, you can also reach Find and Replace through the menu. Click Edit at the top, then select Find and replace from the dropdown. This opens the same panel.
Key Takeaways
- Use Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace when ready without using the menu.
- Type the text you want to find in the first box and the replacement text in the second box, then click Replace All to change every instance at once.
- The "Match case" option makes the search case-sensitive, so "the" will not match "The" unless you turn this on.
- You can undo a Replace All action when ready by pressing Ctrl+Z or Cmd+Z if you make a mistake.
Type what you want to find and what to replace it with
In the Find and Replace panel, the top box is labeled Find. Type the exact text you want to search for — for example, if you want to change every instance of "colour" to "color", type "colour" in this box.
The second box is labeled Replace with. Type what you want to replace it with — in this example, "color". You can leave this box empty if you want to delete the text instead of replacing it with something else.
Do not close the panel yet. The next step determines whether you change one instance or all of them.
Replace one instance or all instances
Once you have entered your find and replace text, you will see several buttons. The button labeled Replace (with a single arrow) changes only the next instance of the text that Google Docs finds. The button labeled Replace all changes every instance in the entire document at once.
If you are unsure whether your search will catch what you intend, click Replace once to see the first match. Google Docs will highlight it in the document so you can confirm it is the right text before you proceed. Then you can click Replace again for the next instance, or switch to Replace all if you are confident.
After you click either button, Google Docs tells you how many replacements it made at the bottom of the panel. If the number surprises you, press Ctrl+Z (or Cmd+Z on Mac) when ready to undo.
Use Match case to distinguish between uppercase and lowercase
By default, Find and Replace treats uppercase and lowercase letters the same way. If you search for "the", it will find "the", "The", and "THE". This is usually what you want.
If you need to distinguish between them — for example, if you want to replace only "the" (lowercase) but not "The" (at the start of a sentence) — check the box labeled Match case before you search. Now "the" will match only the lowercase version.
Search for patterns with regular expressions
Google Docs also supports regular expressions, which are search patterns that find text matching a rule rather than an exact phrase. For example, you can search for any number, any word that starts with a certain letter, or any text between two specific characters.
To use regular expressions, check the box labeled Match using regular expressions in the Find and Replace panel. Then type your pattern in the Find box. Common patterns include . (any single character), \d (any digit), and ^ (the start of a line). If you are not familiar with regular expression syntax, this feature takes practice — start with straightforward searches and work up to more complex patterns.
Regular expressions are powerful but straightforward to get wrong. If your search returns unexpected results, uncheck the box and try a regular text search instead.
Close the Find and Replace panel
When you are finished, close the panel by clicking the X button in the top right corner of the Find and Replace box, or press Escape on your keyboard. Your document remains open with all replacements made.
If you realize you made a mistake after closing the panel, you can still undo the changes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) as many times as needed to step back through your replacements one at a time.
Frequently Asked Questions
Can I undo a Replace All if I change my mind?
Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after you click Replace All. Google Docs will undo all the replacements at once. You can undo multiple times to step back through your recent changes.
What if I want to find text but not replace it?
Use Find instead of Find and Replace. Press Ctrl+F (Windows) or Cmd+F (Mac) to open the Find panel, which is simpler and only searches without replacing. Type your text and Google Docs highlights every match in the document.
Does Find and Replace work in tables or headers?
Yes. Find and Replace searches the entire document, including text in tables, headers, footers, and comments. It does not search in suggestions or tracked changes that have not been accepted yet.
Can I search for line breaks or special characters?
You can search for line breaks if you enable regular expressions and use \n in your search pattern. For other special characters like tabs, regular expressions use \t. If you are not using regular expressions, you cannot search for invisible characters like spaces at the end of a line.