Skip to content
ToolsNow
Guides All tools
Text

Find and replace text, with regex support

Replace every occurrence of a word, phrase or pattern in one pass, with a live count of how many matches were changed. Supports regular expressions when you need them.

Runs entirely in your browser — nothing is uploaded.

Input
0 chars0 words0 lines
Result
0 chars0 words0 lines

How to use

  1. Paste your text. The original stays in the input box so you can adjust and retry.
  2. Enter what to find and what to replace it with. Leave the replacement empty to delete matches instead.
  3. Narrow the match if needed. Use whole-word matching to avoid changing "cat" inside "cats", or switch on regular expressions for patterns.
  4. Check the count, then copy. The match count tells you whether the pattern did what you expected before you use the result.

Questions

Does it replace every match or just the first?

Every match, throughout the text. There is no single-replace mode — use a longer, more specific search string if you only want one occurrence.

Are special characters treated literally?

Yes, unless you switch on regular expressions. Searching for "." finds full stops rather than matching every character, which is what most people expect and what many tools get wrong.

How do I use capture groups?

Switch on regular expressions, wrap part of the pattern in brackets, and reference it as $1 in the replacement. For example, finding "(\w+), (\w+)" and replacing with "$2 $1" swaps "Smith, John" into "John Smith".

What happens if my regular expression is invalid?

The tool tells you what is wrong and leaves your text untouched, rather than silently doing nothing.

Related tools