Skip to main content
Text & Writing Tools

Find and Replace Text

Find and replace words or phrases in any text, with match case, whole-word and regular expression options and a live match count.

Paste your text, type what to find and what to replace it with, and copy the result.

With regular expressions on, use $1, $2 in the replacement for captured groups and \n for a new line.

With regular expressions, test on a copy first - a broad pattern can match more than you intended.

What Is Find and Replace Text?

It replaces every occurrence of a word, phrase or pattern in your text and shows how many matches it found. Options let you match case, match whole words only, replace only the first match, or switch on regular expressions for pattern-based replacements.

When to Use It

  • Updating a product name, price or date throughout a long document.
  • Removing a repeated phrase - leave the replacement empty to delete it.
  • Reformatting data, such as changing dates or swapping first and last names, with a regular expression.

How to Use It

  1. Paste your text.
  2. Type what to find and what to replace it with.
  3. Choose the options you need. The match count and the result update as you type.
  4. Copy the result, or click Use Result as Input to make another replacement on top.

Example: Reformat Dates With a Regular Expression

With regular expressions switched on, find (\d{4})-(\d{2})-(\d{2}) and replace with $3/$2/$1. The three ISO dates 2026-03-14, 2026-04-02 and 2026-05-01 become 14/03/2026, 02/04/2026 and 01/05/2026, and the tool reports 3 matches replaced. Each pair of brackets captures part of the match, and $1, $2 and $3 put those parts back in a new order.

Whole Words and Case

Whole words only stops a search for cat from changing category. Match case treats Apple and apple as different. Both work with plain text and with regular expressions.

Limitations

Regular expressions use JavaScript syntax, which differs slightly from PCRE in PHP or from Python - test on a copy of your text first, because a broad pattern can match more than you intended. The tool works on plain text only, so formatting from Word or Google Docs is not kept. To fix spacing and line breaks, use Remove Extra Spaces & Line Breaks; to check what changed, use Text Compare.

Frequently Asked Questions

Type the word in Find and leave Replace with empty. Every match is removed. Tick Whole words only so that parts of longer words are not deleted.

With Regular expression ticked, wrap parts of the pattern in brackets. In the replacement, $1 is the first bracketed part, $2 the second, and so on, so you can reorder or reuse them.

Turn on Regular expression and type \n in the replacement. Each \n becomes a line break, and \t becomes a tab.

JavaScript syntax with Unicode support. It is close to PCRE and Python, but some features such as possessive quantifiers are not available.
Share this tool: