Open Find and Replace with a keyboard shortcut or menu

The fastest way to find and replace text in Google Docs is to press Ctrl+H on Windows or Cmd+H on Mac. A panel opens on the right side of your document with two text boxes: one for the text you want to find, and one for what you want to replace it with.

If you prefer using the menu, click Edit at the top, then select Find and replace from the dropdown. This opens the same panel as the keyboard shortcut.

The panel stays open until you close it, so you can run multiple searches and replacements without reopening it each time.

Key Takeaways

  • Press Ctrl+H (Windows) or Cmd+H (Mac) to open the Find and Replace panel when ready.
  • 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.
  • Use the Match case option if you need to distinguish between uppercase and lowercase letters, like finding "John" but not "john".
  • Click the three dots menu to access options like matching whole words only or using regular expressions for complex searches.
  • Google Docs shows you how many matches it found before you replace anything, so you can catch mistakes before they happen.

Type what you're looking for and what to replace it with

In the first text box labeled Find, type the exact text you want to search for. In the second box labeled Replace with, type what you want it to become. For example, if you want to change "colour" to "color" throughout your document, you would type "colour" in the Find box and "color" in the Replace with box.

Google Docs will show you a number next to the Find box telling you how many times that text appears in your document. This happens as soon as you finish typing, so you can see the scope of your replacement before you commit to it.

If you only want to replace one specific instance instead of all of them, you can click the single arrow button to move through each match one at a time and choose which ones to replace.

Replace one instance or all instances at once

Once you have entered your find and replace text, you have two main options. The Replace button (with a single arrow) replaces only the current highlighted instance and moves to the next one. Use this when you want to review each change before it happens.

The Replace all button changes every instance of the text in your entire document at once. This is faster when you are confident the replacement is correct throughout — for example, changing a person's name that appears many times, or fixing a consistent spelling mistake.

After you click Replace all, Google Docs tells you how many replacements it made. If the number seems wrong, you can undo the change by pressing Ctrl+Z (Windows) or Cmd+Z (Mac) when ready.

Use Match case to distinguish between uppercase and lowercase

By default, Google Docs treats "John" and "john" as the same when searching. If you need to find only the uppercase version or only the lowercase version, click the three dots menu (⋯) in the Find and Replace panel and check the box next to Match case.

This is useful when you want to change a name that appears in different forms — for instance, replacing "john smith" (lowercase) with "John Smith" (capitalized) without accidentally changing "John" when it appears at the start of a sentence.

Once you enable Match case, it stays on for all your searches in that panel until you uncheck it, so turn it off when you are done if you want to go back to case-insensitive searching.

Match whole words only to avoid partial replacements

Sometimes a word you are searching for appears inside other words. For example, if you search for "cat", Google Docs will also find it in "category", "scatter", and "concatenate". To find only the standalone word "cat", click the three dots menu and check Match entire cell contents.

This option ensures that "cat" matches only when it stands alone, separated by spaces or punctuation, not when it is part of a longer word. This prevents accidental replacements that can break other words or create nonsense.

Like Match case, this setting stays active until you uncheck it, so you can run multiple whole-word searches without resetting it each time.

Use regular expressions for complex find and replace patterns

If you need to find text that follows a pattern rather than exact text, Google Docs supports regular expressions. For example, you could search for any number, any email address, or any word that starts with a specific letter. To enable this, click the three dots menu and check Use regular expressions.

Common regular expression patterns include . (any single character), * (zero or more of the previous character), ^ (start of a line), and $ (end of a line). For instance, the pattern ^[0-9]+$ finds any line that contains only numbers.

Regular expressions are powerful but take practice to learn. If you are new to them, start with straightforward patterns and test on a copy of your document first. Google Docs will show you how many matches it found before you replace, so you can verify the pattern is working as intended.

Close the panel and undo changes if needed

When you are finished with Find and Replace, click the X button in the top right corner of the panel to close it. The panel disappears but your replacements remain in the document.

If you realize a replacement was wrong, press Ctrl+Z (Windows) or Cmd+Z (Mac) when ready to undo it. You can undo multiple times to step back through all your recent changes. Google Docs keeps your full edit history, so you can also click File and then Version history to see all changes and revert to an earlier version if needed.

Frequently Asked Questions

Can I find and replace text that spans multiple lines or paragraphs?

Yes, if you enable regular expressions. In the Find box, use \n to represent a line break. For example, searching for word1\nword2 will find "word1" at the end of one line and "word2" at the start of the next line. Without regular expressions enabled, Google Docs treats line breaks as regular spaces.

What if I want to replace text only in a specific part of my document?

Google Docs Find and Replace always searches the entire document. To limit replacements to one section, select that text first, then open Find and Replace. It will search only within your selection. When you are done, click elsewhere to deselect.

Can I find and replace formatting, like bold or italics?

No, Google Docs Find and Replace works only with text content, not formatting. To change formatting across your document, select all the text you want to change (Ctrl+A or Cmd+A), then use the toolbar buttons or Format menu to explore the new formatting.

Does Find and Replace work the same way in Google Sheets?

Yes, Google Sheets uses the same keyboard shortcut (Ctrl+H or Cmd+H) and has the same Find and Replace panel. The options work identically, including Match case, whole words, and regular expressions.

What happens if I replace text in a document that other people are editing?

Your replacements appear in real time for anyone viewing the document. If someone else is editing the same section, Google Docs may show a conflict notification, but replacements usually go through without blocking other edits. Always let collaborators know before running a large Replace All operation.