Open Find and Replace in Google Docs

The fastest way to find and replace text in Google Docs is to 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. If the keyboard shortcut does not work, you can also go to the menu: click Edit, then select Find and replace from the dropdown.

The panel that appears has two main fields: one labeled Find and one labeled Replace with. You type the text you want to search for in the Find field and the text you want to use instead in the Replace with field. Below those fields are buttons to replace one instance at a time or all instances at once.

Key Takeaways

  • Use Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace, or go through the Edit menu.
  • Type the text you want to find in the first field and the replacement text in the second field, then click Replace All to change every instance at once.
  • The Match case option makes the search case-sensitive, so "Name" will not match "name" if that box is checked.
  • You can search for whole words only by checking the Match entire cell contents option, which prevents partial matches within longer words.
  • The search works across your entire document unless you have selected a specific section beforehand.

Type Your Search Term and Replacement Text

In the Find

In the Replace with field, type what you want that text to become. If you want to delete the text instead of replacing it with something else, leave this field blank and click Replace All.

For example, if your document says "John Smith" in five places and you want to change it to "J. Smith", you would type "John Smith" in the Find field and "J. Smith" in the Replace with field.

Choose Between Replace One at a Time or Replace All

After you enter your search and replacement text, Google Docs shows you how many matches it found. You have two options: replace them one by one or replace all of them at once.

Click the down arrow button (or the button that looks like a single arrow) to move to the next match without replacing it. This lets you review each instance before you decide whether to replace it. Click the Replace button next to the Replace with field to replace only that one instance, then move to the next match.

Click Replace all to change every instance of your search term to the replacement text in one action. This is faster when you are confident the replacement is correct throughout the document. Google Docs will tell you how many replacements it made.

Use Match Case to Control Capitalization

By default, Google Docs ignores whether letters are uppercase or lowercase. If you search for "hello", it will find "Hello", "HELLO", and "hello" all the same way.

Check the Match case box if you want the search to be case-sensitive. This means "Hello" will only match "Hello", not "hello" or "HELLO". This is useful when you need to replace a proper noun or a word that should always be capitalized in a specific way.

Search for Whole Words Only

By default, Google Docs finds your search term even if it is part of a longer word. If you search for "cat", it will find "cat", "cats", "category", and "concatenate".

Check the Match entire cell contents box to search for whole words only. Now searching for "cat" will find only the word "cat" by itself, not "cats" or "category". This prevents accidental replacements in words you did not intend to change.

Search Within a Selected Section

If you want to limit your search to a specific part of the document, select that text first before opening Find and Replace. Highlight the section you want to search in, then open Find and Replace with Ctrl+H or Cmd+H. The search will only look within your selected text.

This is helpful when you have a document with multiple sections and you only want to replace text in one area. Once you close Find and Replace, your selection will be cleared.

Use Regular Expressions for Advanced Searches

Google Docs supports regular expressions, which are patterns that let you search for text in more complex ways. For example, you can search for any number, any letter, or any text that follows a certain pattern.

To use regular expressions, check the box labeled Use regular expressions in the Find and Replace panel. Common patterns include a period (.) to match any single character, a plus sign (+) to match one or more of the previous character, and brackets like [0-9] to match any digit. If you are not familiar with regular expression syntax, this option is safe to leave unchecked.

Frequently Asked Questions

Can I undo a Replace All if I make a mistake?

Yes. Press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after the replacement to undo it. Google Docs treats Replace All as a single action, so one undo will reverse all the changes at once. If you have made other edits since the replacement, you may need to undo multiple times.

Does Find and Replace work in shared documents?

Yes, Find and Replace works the same way in documents you own and documents that are shared with you. However, if someone else is editing the document at the same time, the changes may not appear when ready for them, and they may see a notification that the document has been updated.

Can I search for line breaks or special characters?

You can search for some special characters by typing them directly into the Find field. For line breaks, you would need to use regular expressions: search for \n to find a line break. Check the Use regular expressions box first, then type \n in the Find field.

What happens if I search for text that does not exist in the document?

Google Docs will show "0 matches" in the Find and Replace panel. No replacements will be made. You can then adjust your search term and try again.

Can I replace text with formatting, like bold or italics?

Google Docs does not allow you to add formatting through the Find and Replace panel. You can only replace text with other text. If you need to add formatting, you will need to do that manually or select the replaced text and explore formatting afterward.