Find and Replace Text Online (With Regex)

Replace every occurrence of a word or phrase at once, with options for matching case, whole words, and regular expressions.

0 words · 0 characters

Example

Find “colour”, replace with “color”

Before
Our colour guide covers colour theory and colour matching.
After
Our color guide covers color theory and color matching.

Whole words

With “Whole words only” on, searching for “cat” won’t touch “category” or “concatenate”.

Regular expressions

Turn on “Regular expression” to search with patterns. For example, \d{3}-\d{4} matches phone number endings like 555-0199. In the replacement, $1 inserts whatever the first set of parentheses captured.

Everyday examples

Change British to American spelling (“colour” to “color”), update a product name throughout a document, replace straight quotes with typographic ones, or strip a repeated phrase by leaving the replacement empty. The result updates as you type, so you can see each change before copying.

Regular expression starter kit

Regular expressions use JavaScript syntax. A few useful patterns: \s+ matches any run of spaces and line breaks; {2,} (a space followed by {2,}) matches two or more spaces in a row, so you can replace it with a single space; \d+ matches any number; (\w+)@(\w+) captures the parts of an email address, which you can reorder in the replacement with $2 and $1.

If a pattern is invalid, the tool tells you instead of changing your text.

Frequently asked questions

Is the search case-sensitive?

Not by default. Turn on “Match case” to replace only exact matches.

Can I delete text instead of replacing it?

Yes. Leave “Replace with” empty and every match is removed.

Does “Whole words only” work with punctuation?

Yes. A word next to punctuation, such as “cat,” or “(cat)”, still counts as a whole word.