Text Tools

Find & Replace Text

Find text and replace all matching occurrences.

Results are provided for general informational use. Verify important financial, health or legal figures before relying on them.

About this Find & Replace Text

The Find & Replace Text tool changes repeated text in a larger block without requiring a desktop editor. It supports case-sensitive or case-insensitive matching and reports how many replacements were made.

Find and replace across a block of text is far faster and more reliable than manually scanning for and retyping every occurrence of a word or phrase, particularly for longer documents where a term needs to be updated consistently.

How the calculation works

The search term is treated as literal text rather than a regular expression, which avoids unexpected special-character behavior.

How to use it

  1. Paste the source text.
  2. Enter the text to find and its replacement.
  3. Choose case sensitivity and apply the replacement.

Practical example

Replacing “cat” with “dog” changes every matching occurrence according to the selected case setting.

Running find-and-replace to change every instance of 2023 to 2024 across a long document instantly updates all matching year references at once, a task that would otherwise require manually correcting each occurrence.

Things to double-check

A basic find-and-replace matches exact text only, so replacing cat would also affect the cat inside category or concatenate unless the tool offers a whole-word-only matching option.

How replacement works

The tool searches the text for every occurrence of the phrase you enter and replaces it with the new phrase. Replacing colour with color changes every match in one step, which is much faster and more reliable than editing by hand. Leaving the replacement empty deletes the matches. Because it works on the exact characters you type, capital letters, spaces and punctuation in the search term all matter.

The substring trap

A search matches text inside longer words. Replacing cat with dog also changes category into dogegory and concatenate into condogenate. To avoid this, include spaces or punctuation around the search term, or check the result for unexpected changes. Short search terms are the riskiest, so make them as specific as you can, and read through the output before you use it.

Safe editing habits

Keep a copy of the original text before a bulk change, because the tool does not remember previous versions. Test the replacement on a short sample first. When you need several replacements, run them one at a time and check each result, since an early replacement can create text that a later one then changes by accident. Be careful with names, numbers and dates that might appear in other contexts.

Practical uses

Find and replace is useful for updating a product name across a long document, changing a date format, fixing a repeated spelling mistake, swapping delimiters in a list, or removing a repeated phrase. When you change semicolons to commas in data, remember that commas inside quoted fields can break a CSV file. For text that will be published, proofread the full result once more after the replacement.

A cleanup recipe

Find and replace can also fix spacing. To remove double spaces, replace two spaces with one. Because a run of four spaces becomes two after one pass, repeat the replacement until the text no longer changes. To convert a list from semicolons to commas, replace each semicolon with a comma, but check that no value contains a semicolon of its own. To change a name everywhere, search for the exact spelling and watch for the same letters inside longer words. Always scan the result before you save it.

A safe workflow

Follow a short routine each time. First copy the original text somewhere safe. Second, run the replacement on a small part of the text and read the result. Third, apply it to the whole text. Fourth, compare the before and after with the Text Diff Checker to see exactly what changed, which makes unexpected replacements easy to spot. Finally, if something is wrong, restore the copy and refine the search term. This takes a minute and prevents errors that are hard to find later.

Worked example: American to British spelling

Suppose you want to change color to colour in a document. A plain replacement also turns colorful into colourful, which is what you want, but it turns Colorado into Colourado if the match ignores capitals, and it changes the word inside a quotation or a product name that must stay as written. After you run the replacement, search for words that now contain the new spelling and check each one. This simple example shows why an automatic change always needs a quick review, and why specific search terms are safer than short ones.

Cleaning formats and separators

Find and replace is useful for tidying data. You can replace slashes with hyphens in dates, remove dashes from phone numbers so they are all in the same form, change semicolons to commas in a list or turn a double space into a single one. When you change delimiters in a data file, be careful about fields that contain the delimiter inside quotes, because the replacement will change those as well. Work on a copy, and verify with a few sample rows before you use the result in another system.

Placeholders and mail merge

A simple template can use placeholders such as {{name}} and {{date}}. Replace each placeholder in turn with the real value to produce a personalised letter. Keep the placeholders unique and unlikely to appear in normal text, so that they are not matched by accident. After replacing all of them, search for any remaining double braces to make sure that none were missed. For large mailings, use a mail merge feature or a script, since doing it by hand for hundreds of letters invites errors.

Protecting yourself from mistakes

Work in steps. Save a copy of the original, test on a short sample, run the replacement, then compare the before and after with the Text Diff Checker to see every changed line. Consider case sensitivity and whole-word matching, which prevent changes inside longer words. Keep a note of each search and replacement pair, especially if you will repeat the process on other documents. If you spot a problem, go back to the copy, adjust the search term and try again. A careful routine saves much more time than it costs.

Key terms explained

A search term is the text you look for, and the replacement is what you put in its place. Case sensitivity decides whether capitals must match. A whole-word match avoids changes inside longer words. A substring is a piece of a longer string. A delimiter separates items, like a comma in a list. A placeholder is a marker that stands for a value, for example a name in curly brackets. A regular expression is a pattern language for advanced searches.

Rules of thumb and quick checks

Make the search term as specific as possible, include spaces or punctuation to limit matches, and run the replacement on a sample first. Keep a copy of the original and compare the result with the Text Diff Checker. Search for any leftover placeholders after a merge. To remove double spaces, replace two spaces with one and repeat until no change occurs. Review proper names and quotations after a bulk change.

Quick reference and sanity checks

Before replacing, decide whether the search should respect capital letters and whether it should match whole words only. Searching for cat without whole-word matching also changes category and scatter. Replace one test phrase first and read the result, then apply the full change. Remember that a replacement is applied to every match at once, so keep a copy of the original text. Special characters such as dots, brackets and slashes are treated as plain text in a simple tool, but they have special meanings in pattern languages, so check the options. Compare the character count before and after to see that the change is of the size that you expected.

Frequently asked questions

Can I replace with nothing?

Yes. Leave the replacement field empty to remove matches.

Can matching ignore letter case?

Yes. Use the case-sensitive option to control behavior.

Does it support regular expressions?

No. The search value is treated literally.

Will find and replace accidentally change part of a longer word?

Yes, unless whole-word matching is used; searching for art and replacing it would also affect the art inside words like start or article.

Can I undo a find-and-replace if I make a mistake?

This depends on how you're using the output; it's good practice to keep a copy of your original text before running a bulk find-and-replace.

Keep exploring

More Text Tools

View category →