The Replace All feature finds and changes every instance of a word or phrase in your document at once
Microsoft Word's Replace All function scans your entire document and swaps out every occurrence of one word or phrase for another in a single action. This saves you from clicking through dozens of individual replacements one by one. The feature lives in the Find & Replace dialog, which you open with Ctrl+H on Windows or Command+Option+F on Mac.
Replace All works on exact text matches by default, but you can also search for patterns — like "any number" or "a space followed by a letter" — if you turn on regular expressions. Most people use it for straightforward tasks: changing a client's name throughout a contract, updating a product name, or fixing a repeated typo across pages.
Key Takeaways
- Open Find & Replace with Ctrl+H (Windows) or Command+Option+F (Mac), type the text you want to find and what you want it to become, then click Replace All.
- Word shows you how many replacements it made, so you can undo the whole action if the results are wrong.
- Use the "Match case" option if you need to preserve capital letters, and "Whole words only" if you want to avoid changing part of a longer word.
- Regular expressions let you search for patterns instead of exact text, but this feature is harder to use and requires you to learn the pattern syntax.
Opening Find & Replace and entering your search terms
Press Ctrl+H on a Windows keyboard or Command+Option+F on a Mac. The Find & Replace dialog opens as a panel on the right side of your screen (Windows) or as a floating window (Mac). You will see two text boxes: one labeled "Find" at the top and one labeled "Replace" below it.
Type the word or phrase you want to find in the "Find" box. Then click in the "Replace" box and type what you want it to become. If you are replacing a word with nothing — deleting it — leave the "Replace" box empty. Do not press Enter yet; that will only replace the first match.
Clicking Replace All to change every instance
Once you have entered both the search term and the replacement, look for the button labeled "Replace All". On Windows, it is usually to the right of the "Replace" box. On Mac, it appears below the text boxes. Click it once.
Word scans the entire document and makes every replacement at once. A message appears telling you how many replacements were made — for example, "5 replacements made". If the number surprises you or seems wrong, press Ctrl+Z when ready to undo the entire Replace All action and try again with different settings.
Using Match Case to preserve capital letters
By default, Replace All ignores whether letters are uppercase or lowercase. If you search for "smith" it will find "Smith", "SMITH", and "smith" and replace all of them with whatever you typed in the Replace box. This can cause problems: if you replace "smith" with "jones", you end up with "jones" even where the original was "Smith".
To keep capital letters in their original positions, check the box labeled "Match case" before clicking Replace All. Now "Smith" will only match "Smith", and "smith" will only match "smith". Word will not change "Smith" to "jones" — it will leave it alone because the case does not match.
Using Whole Words Only to avoid partial matches
Replace All normally finds your search term anywhere it appears, even inside a longer word. If you search for "read" it will find "read", "reading", "already", and "thread". This is usually not what you want.
Check the box labeled "Whole words only" to match only complete words surrounded by spaces or punctuation. Now "read" will find only the word "read" by itself, not "reading" or "thread". Combine this with "Match case" if you need both — for example, to replace only "Read" at the start of a sentence without touching "reading" or "already".
Using regular expressions to search for patterns
Regular expressions let you search for patterns instead of exact text. For example, you can search for "any number" or "a space followed by two letters" without typing out every possibility. This is powerful but requires you to learn a special syntax that Word uses.
To turn on regular expressions, check the box labeled "Use regular expressions" (the label varies slightly between Windows and Mac versions). Common patterns include . (any single character), \d (any digit), \s (any space), and ^ (the start of a paragraph). If you are not familiar with regular expression syntax, this feature is usually not worth the learning curve for straightforward replacements — stick with "Match case" and "Whole words only" instead.
Undoing Replace All if something goes wrong
If you click Replace All and the results are not what you expected, press Ctrl+Z when ready to undo the entire action. Word treats Replace All as a single undo step, so one Ctrl+Z reverses all the replacements at once, not just the last one.
This is why it is safe to experiment: if you are unsure whether your search term will match what you think it will, click Replace All and check the result. If it is wrong, undo and try again with "Match case" or "Whole words only" turned on. You can undo and redo as many times as you need.
Frequently Asked Questions
Can I replace text in only part of my document?
Yes. Select the section of text you want to search before opening Find & Replace. Word will only search within your selection. If you do not select anything, Replace All searches the entire document.
What happens if I replace something by accident?
Press Ctrl+Z to undo the entire Replace All action. Word reverses all the replacements in one step, not one at a time. If you have made other changes since the replacement, you may need to press Ctrl+Z multiple times to get back to before the replacement happened.
Can I search for a line break or a paragraph mark?
Yes, but the syntax depends on whether you have regular expressions turned on. With regular expressions off, use ^p to find a paragraph break. With regular expressions on, use \n. You can replace paragraph marks with spaces, or vice versa, to reformat text quickly.
Does Replace All work in headers, footers, and text boxes?
Yes. Replace All searches the entire document, including headers, footers, footnotes, endnotes, and text boxes. If you want to exclude any of these, you will need to search and replace them separately or manually.