Find and Replace

Replace text literally or by regex, with a live match count.

Loading the interactive tool… It runs in your browser — if it doesn't appear, enable JavaScript.

Paste text, say what to find and what to replace it with, and see the result and the match count update as you type. In plain mode your search is matched literally, so dots, brackets, dollar signs and slashes mean themselves and you don't have to escape anything.

Switch on regular expressions for patterns, where capture groups are available in the replacement as $1, $2 and so on. "Whole words only" wraps your search in word boundaries, which stops "cat" matching inside "category" — the single most common cause of a bulk replace going wrong.

Frequently asked questions

Do I need to escape special characters?

Not in plain mode — your search text is escaped for you, so a search for "price ($)" finds exactly that. Only in regular-expression mode do characters like . * + ( ) [ ] take on their pattern meanings.

How do I use capture groups in the replacement?

Enable regular expressions, put brackets around the part you want to keep, and reference it as $1 in the replacement. For example, finding (\w+)@example\.com and replacing with $1@newdomain.com rewrites the domain while preserving each username.

Why does my replacement contain the original text?

In regex mode,

amp; in a replacement inserts the whole match and $1 inserts a group — so a literal dollar sign needs writing as $. In plain mode this is handled for you and dollar signs are inserted literally.

Is the replacement case sensitive?

Not by default, so "Customer" also matches "customer" and "CUSTOMER". Turn on case sensitivity when the distinction matters. Note that the replacement text is inserted exactly as written — it doesn't try to match the original's capitalisation.