Find and replace with the text replacer
The text replacer finds every occurrence of a word, phrase or pattern in your text and swaps it for something else in one pass. It reports how many replacements it made, so you can confirm the edit did what you expected. You can make matching case sensitive, restrict it to whole words, or switch on regular expressions.
How matching works by default
With every option off, the search is a plain, case-insensitive substring match. Characters such as ., * or ( are treated literally, and all matches are replaced, not just the first.
Text: The quick brown fox jumps over the lazy dog.
The Fox is quick; foxes are quicker.
Find: fox Replace with: cat
Result: The quick brown cat jumps over the lazy dog.
The cat is quick; cates are quicker.
(3 replacements made)
Notice that "foxes" became "cates". Substring matching ignores word boundaries, and this is the most common find-and-replace mistake.
Options explained
- Case sensitive – only exact-case matches count. In the example, "Fox" is left alone and 2 replacements are made.
- Whole words only – a match may not touch a letter, digit or underscore on either side. "fox" and "Fox" change, "foxes" does not. The check understands accented and non-Latin letters.
- Regular expression – the find field becomes a JavaScript regular expression. In the replacement,
$1,$2and so on insert capture groups and$&inserts the whole match.
In the replacement field, \n inserts a line break and \t a tab, in both plain and regex mode. Replacing , with \n turns a comma-separated list into one item per line.
Regex example: reformat dates
Find: (\d{4})-(\d{2})-(\d{2})
Replace: $3/$2/$1
Text: 2024-03-15 and 2025-12-01
Result: 15/03/2024 and 01/12/2025
Patterns run with the global and Unicode flags, and case-insensitive unless you tick case sensitive. There is no multiline flag, so ^ and $ match only the start and end of the whole text, and . does not match line breaks. To prefix every line, find (^|\n) and replace with $1- . An invalid pattern, such as an unclosed parenthesis, shows an error and leaves your text untouched.
Outside regex mode, a $1 in the replacement is inserted literally, which is what you want when replacing prices or variable names.
Related tools
For renaming terms, the word replacer has whole-word matching switched on from the start. To review exactly what changed, compare the before and after versions in the diff checker. To delete entire lines that contain a term instead of editing them, use remove lines containing.
Privacy
The processing runs entirely in your browser. The text you enter is not uploaded to a server.