Use Find and Replace to swap words throughout a document at once

Google Docs has a built-in Find and Replace tool that searches for a word or phrase and swaps it for another one across your entire document in seconds. You open it by pressing Ctrl+H on Windows or Command+H on Mac. Type the word you want to find in the first box, type the replacement word in the second box, then choose whether to replace one instance at a time or all of them at once.

This is faster and more reliable than scrolling through a document and changing each word by hand, especially in longer documents where you might miss some instances or accidentally change a word in a place where you did not mean to.

Key Takeaways

  • Open Find and Replace by pressing Ctrl+H (Windows) or Command+H (Mac), or by clicking the three-dot menu and selecting Find and Replace.
  • Type the word to find in the first field and the replacement word in the second field, then click Replace All to change every instance at once.
  • Use the Match case option if you want to replace only words that match the exact capitalization you typed.
  • Click Replace instead of Replace All if you want to review each instance before changing it, in case the word appears in contexts where you do not want to replace it.
  • You can search for punctuation, line breaks, and partial words by using regular expressions, though this requires turning on the option in Find and Replace settings.

Step-by-step: opening Find and Replace

The fastest way is the keyboard shortcut. Press Ctrl+H if you are on Windows, or Command+H if you are on Mac. A panel will open on the right side of your screen with two text boxes stacked vertically.

If you prefer to use the menu, click the three-dot icon in the top right corner of your Google Docs window. Scroll down and click Find and Replace. The same panel opens on the right.

How to enter search and replacement text

In the top box labeled Find, type the exact word or phrase you want to search for. In the box below it labeled Replace with, type what you want it to become. If you are replacing a single word with another single word, just type both words and move on.

For example, if your document says "colour" throughout and you want to change it to "color", type "colour" in the Find box and "color" in the Replace with box. If you want to replace a whole phrase like "in order to" with "to", type the full phrase in the Find box and the shorter version in the Replace with box.

Leave the Replace with box empty if you want to delete a word entirely. Type the word in the Find box, leave Replace with blank, and click Replace All. The word will disappear from your document.

Replace one at a time or all at once

After you enter your search and replacement text, you will see two buttons: Replace and Replace All. The choice depends on whether you trust the replacement to be correct everywhere it appears.

Click Replace All if you are certain the word should be replaced in every location. Google Docs will change every instance in seconds and show you a count of how many replacements it made. This is the faster option for straightforward changes like fixing a misspelled name or swapping one standard term for another.

Click Replace (the single-instance button) if you want to review each match before changing it. Google Docs will highlight the first instance of the word in your document. You can then click Replace to change just that one, or click the down arrow to skip to the next instance without changing the current one. This takes longer but prevents mistakes when a word might mean different things in different parts of your document.

Match case to control capitalization

By default, Find and Replace ignores capitalization. If you search for "apple", it will find "apple", "Apple", and "APPLE" and replace all of them with whatever you typed in the Replace with box.

If you want to replace only words that match the exact capitalization you typed, click the three-dot menu within the Find and Replace panel (it appears to the right of the Replace with box) and check the box next to Match case. Now a search for "Apple" will find only "Apple", not "apple" or "APPLE".

Search for punctuation and special characters

You can search for punctuation marks and replace them the same way you search for words. To remove all commas, search for "," and leave the Replace with box empty. To replace a comma with a semicolon, search for "," and type ";" in the Replace with box.

For more advanced searches — like finding a word only when it appears at the start of a line, or finding any number — you can turn on regular expressions. Click the three-dot menu in the Find and Replace panel and check Use regular expressions. This unlocks pattern-matching, but it requires learning the syntax for regular expressions, which is beyond the scope of basic Find and Replace.

Undo a replacement if it went wrong

If you click Replace All and the results are not what you expected, press Ctrl+Z (Windows) or Command+Z (Mac) when ready to undo the replacement. Google Docs will restore your document to the state it was in before you ran Find and Replace.

This is why Replace All is safe to use even if you are not 100 percent certain — you can always undo it in one keystroke. However, if you have made other edits since the replacement, undoing will also undo those edits, so it is best to fix the replacement right away.

Frequently Asked Questions

Can I search for a word only if it is a whole word, not part of another word?

Yes. Open Find and Replace, enter your search term, click the three-dot menu, and check Match entire cell contents. This prevents the search from matching partial words. For example, searching for "cat" will find "cat" but not "catalog" or "scatter".

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

Find and Replace always searches the entire document. If you want to change text in only one section, select that section first by clicking and dragging to highlight it, then open Find and Replace. It will search only within your selection.

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

Google Docs Find and Replace does not support replacing text with formatted text directly. You can replace the word itself, then manually format the replacement, or use regular expressions if you have advanced knowledge of that feature.

Does Find and Replace work in shared documents or documents with comments?

Find and Replace searches only the main document text, not comments or suggestions. If you need to change text that appears in comments, you must edit those comments by hand.

Can I search for line breaks or paragraph marks?

Yes, but only if you turn on regular expressions. With regular expressions enabled, search for "\n" to find line breaks. This is an advanced feature and requires familiarity with regex syntax.