Skip to content
DayUtils

Find and Replace – Replace Words in Text Online

Replace every occurrence of a word or phrase in your text at once. Match case, replace whole words only, or switch on regular expressions for powerful pattern-based replacements with capture groups. The tool tells you how many replacements it made.

Loading tool…

How to use find and replace

  1. Paste your text.
  2. Type what to find and what to replace it with.
  3. Choose the options:
    • Match case — only exact capitalisation.
    • Whole words only — skip matches inside longer words.
    • Regular expression — treat Find as a pattern.
  4. Read the result and the number of replacements. Copy or download it, or press Use as input to make another replacement.

Example

With Find colour, Replace color and the default options, “Our colour range includes a new colour every month. Colour samples are free.” becomes “Our color range includes a new color every month. color samples are free.” — 3 replacements. Tick Match case and only the two lowercase matches change.

Regular expression examples

FindReplaceEffect
\s+(a space)turn any run of spaces into one
^\s+(nothing)remove spaces at the start of lines
(\w+)@(\w+)\.com$1 at $2 dot comrewrite email addresses
(\d{4})-(\d{2})-(\d{2})$3/$2/$1change date format
\bteh\bthefix a common typo

Regular expressions here use JavaScript syntax with Unicode support. Test complex patterns first with the regex tester.

Common uses

  • Updating names — a product, company or person mentioned many times.
  • Switching spelling between British and American English (colour/color, organise/organize).
  • Cleaning data — removing symbols, units or currency signs.
  • Reformatting dates, phone numbers or codes with regular expressions.
  • Anonymising text — replacing names with placeholders before sharing.

Tips

  • Use whole words for short words, or you may change parts of other words.
  • Check the count. If it is much higher than you expected, a match is probably hitting other words.
  • Work in steps. Several simple replacements are easier to check than one complex pattern.
  • Compare before and after with text compare when the changes matter.

Special characters

Without regular expressions, every character you type is matched literally, including dots, brackets and question marks — so you can safely search for “3.5” or “(draft)”. With regular expressions switched on, those characters have special meanings and need a backslash to be matched literally, for example 3\.5.

Line breaks

In regular-expression mode you can match line breaks with \n. For example, finding \n\n+ and replacing it with \n removes empty lines between paragraphs.

Replacing in several steps

Press Use as input after a replacement to move the result into the input box, then set up the next find and replace. Working this way, you can apply a chain of changes and check each one before moving on.

Privacy

Find and replace runs in your browser. Your text is never uploaded, so it is safe for contracts, manuscripts and internal documents.

To fix spacing in pasted text, use remove extra spaces, and for capitalisation, the case converter.

Frequently asked questions

How do I replace a word in a long text?

Paste the text, type the word in “Find” and its replacement in “Replace with”. Every occurrence is replaced and the count is shown. Copy the result when you’re happy.

What does “Whole words only” do?

It replaces the word only when it stands on its own. Replacing “cat” with “dog” changes “cat” and “Cat” but not “category” or “concatenate”.

What does “Match case” do?

With it on, only text with exactly the same capitalisation is replaced. With it off, “Colour”, “colour” and “COLOUR” all match.

How do regular expressions work here?

Tick “Regular expression” and type a pattern in Find. In the replacement, use $1, $2 for numbered groups or $<name> for named groups. For example, find (\d+)-(\d+)-(\d+) and replace with $3/$2/$1 to turn 2026-11-08 into 08/11/2026.

How do I delete a word?

Leave “Replace with” empty. Every match is removed.

Is there an undo?

Your original text stays in the input box, so nothing is lost. Change the options or clear the replacement to see the original again.

Last updated: