Open Find and Replace in Google Docs

The fastest way to search 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. You can also reach it through the menu: click Edit at the top, then select Find and replace from the dropdown.

The panel that appears has two main fields. The top field is where you type the text you want to find. The bottom field is where you type what you want to replace it with. Below those are buttons to control how the replacement happens.

Key Takeaways

  • Use Ctrl+H (Windows) or Cmd+H (Mac) to open Find and Replace when ready, or go through the Edit menu.
  • Type the text you want to find in the top field and the replacement text in the bottom field.
  • Use "Match case" if you need to find only uppercase or lowercase versions, and "Match entire cell contents" to find whole words only.
  • Click "Replace all" to change every instance at once, or "Replace" to change one at a time and review each change.
  • The search works across your entire document, including headers, footers, and comments if you check those options.

Type Your Search Term and Replacement Text

In the top field labeled "Find", type the exact text you want to search for. This can be a single word, a phrase, or even a sentence. Google Docs will highlight every match in your document as you type, so you can see how many instances exist before you make any changes.

In the bottom field labeled "Replace with", type what you want those matches to become. If you want to delete the text instead of replacing it with something else, leave this field blank and the search term will straightforward be removed.

If you leave the "Find" field empty and only fill in "Replace with", nothing will happen — Google Docs requires you to search for something first.

Choose Your Search Options

Below the two text fields are three checkboxes that control how strictly Google Docs searches. Match case means the search will only find text that matches the exact capitalization you typed. For example, if you search for "hello" with Match case checked, it will not find "Hello" or "HELLO". Leave this unchecked if you want to find all versions regardless of capitalization.

Match entire cell contents is the option that finds whole words only. If you search for "cat" without this checked, it will also find "catalog" and "scatter". With this checked, it finds only the word "cat" standing alone. This is useful when you want to avoid accidentally replacing part of a longer word.

The third option, Search in, lets you choose whether to search the entire document, just the current selection, or specific parts like headers, footers, and comments. By default it searches the whole document.

Replace One Instance or All at Once

Once you have entered your search term and replacement text, you have two choices. The Replace button (with a single arrow icon) replaces only the currently highlighted match. This is the safer option if you want to review each change before it happens. After you click Replace, Google Docs moves to the next match automatically, so you can decide whether to replace that one too.

The Replace all button changes every match in your document at once. Use this when you are confident the replacement is correct throughout — for example, if you are changing a company name that appears many times. Google Docs will tell you how many replacements it made when it finishes.

If you make a mistake, you can undo the replacement by pressing Ctrl+Z (Windows) or Cmd+Z (Mac) when ready after.

Search Across Headers, Footers, and Comments

By default, Find and Replace searches only the main body of your document. If you need to search in headers or footers — the text that repeats at the top or bottom of every page — click the dropdown next to "Search in" and check those boxes. The same applies if you want to search within comments that other people have left on the document.

This is useful when you are making a global change, like updating a date or a title that appears in multiple places. Just remember that if you do not check these options, any instances in headers, footers, or comments will be missed.

What Happens When No Matches Are Found

If you type a search term that does not exist anywhere in your document, Google Docs will show a message saying "No matches found". This usually means either the text is spelled differently than you typed it, or it does not exist in the document at all. Check your spelling, try removing extra spaces, or try searching for a shorter phrase that you know is there.

If you are searching with "Match case" checked and you are not finding what you expect, try unchecking it. The text might be capitalized differently than you remembered. Similarly, if "Match entire cell contents" is checked, you might be missing partial matches — uncheck it and search again.

Close the Find and Replace Panel

When you are done searching and replacing, 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 unchanged except for the replacements you made.

The Find and Replace panel does not save your search terms between sessions. If you close it and open it again later, the fields will be empty and you will need to type your search term again.

Frequently Asked Questions

Can I search for line breaks or special characters?

Google Docs does not support searching for line breaks, tabs, or other special formatting characters the way some word processors do. You can search for regular text and punctuation marks, but not invisible formatting. If you need to find and remove extra line breaks, try searching for multiple spaces or paragraph marks by copying and pasting them directly from your document.

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

Highlight the section of text you want to search in before opening Find and Replace. Then click the "Search in" dropdown and select "Selection". The search will only look within the text you highlighted, leaving the rest of your document untouched.

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

Google Sheets has a similar Find and Replace feature with the same keyboard shortcut (Ctrl+H or Cmd+H), but it works slightly differently. In Sheets, "Match entire cell contents" means the entire cell must match, not just the word. The basic steps are the same, but the options behave differently because Sheets organizes data in cells rather than flowing text.

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

Yes. when ready after clicking Replace All, press Ctrl+Z (Windows) or Cmd+Z (Mac) to undo the entire operation. This reverses all the replacements at once. If you wait too long or make other edits first, the undo may not work, so act quickly if you realize you made a mistake.

Will Find and Replace work if someone else is editing the document at the same time?

Find and Replace works on your view of the document, but if multiple people are editing simultaneously, you might see conflicts. It is safest to use Find and Replace when you are the only person actively editing. If others are in the document, let them know before you do a Replace All to avoid confusion.