Find & Replace in Text

Find and replace text, including a regular-expression mode.

Regular expression
Case sensitive
Whole word only
Input
Result
The quick brown fox jumps over the lazy cat. The cat barks.
Replacements: 2

This tool finds every occurrence of a string or pattern in text and replaces it with another string. Plain mode looks for an exact substring, with "case sensitive" and "whole word only" options (so "cat" doesn't get replaced inside "catalog"). Regex mode accepts an arbitrary pattern and flags (g, i, m…) and supports capture groups in the replacement — $1, $2, and so on.

Useful for bulk-editing text without opening a text editor: swap an old domain name for a new one across a whole list of links, reformat phone numbers or dates into a consistent shape using regex groups, or strip or replace stray characters in an export.

Everything runs right in your browser — your text is never sent anywhere. The number of replacements made is shown, or an error message if the pattern is invalid.

Frequently asked questions

In regex mode, parenthesized parts of the pattern can be inserted into the replacement as $1, $2, etc. — for example, the pattern (\w+) (\w+) with replacement $2 $1 swaps two words.
It restricts matches to word boundaries: searching for "cat" with this option finds "cat" but leaves "catalog" alone. This option is only available in plain mode.
The tool shows an error message instead of a result — the text stays unchanged until the pattern is fixed.