Find and Replace
Replace every occurrence of a word, phrase or pattern in a block of text, and see how many matches were replaced.
Your text stays in this browser tab. Nothing is uploaded, saved or logged.
How the Find and Replace works
In the default mode the text you type is matched literally, so a dot, a plus sign or a bracket is just that character. \n stands for a line break and \t for a tab, which lets you replace line breaks. In the replacement, a dollar sign is literal. Matching ignores capital letters unless you turn on “Case sensitive”.
“Whole words only” matches only when the text is not stuck to a letter, a digit or an underscore on either side, for any alphabet, so “cat” does not match inside “concat” or “cats”. Turn on “Regular expression” to use JavaScript patterns instead. They run in Unicode mode, ^ and $ match at the start and end of every line, and the replacement can use $1 and $2 for captured groups, $& for the whole match and $<name> for a named group.
An invalid pattern gives a plain-language message instead of an error. Patterns that match the empty string, such as x*, are handled safely, and a replacement that would grow the result beyond 5 million characters is refused so the page does not freeze. Leave “Replace with” empty to delete every match.
How to use it
- Paste your text.
- Enter the text to find and the text to replace it with.
- Switch on case, whole-word or regular-expression matching if you need it, then copy the result.
Example
A regular expression turns the date 2026-11-06 into 06/11/2026.
Input
Dear Ms. Carter, Thanks for your order #1042. Your order ships on 2026-11-06. Your order will arrive within 3 days.
Result
Dear Ms. Carter, Thanks for your order #1042. Your order ships on 06/11/2026. Your order will arrive within 3 days.
Frequently asked questions
How do I use the matched text in the replacement?
Turn on “Regular expression”, put parentheses around the parts you want to reuse in the pattern, and write $1, $2 and so on in the replacement. $& inserts the whole match and $<name> inserts a named group.
Why does my pattern say it is not valid?
Regular-expression mode uses JavaScript syntax. Common causes are an unclosed parenthesis or bracket, a quantifier with nothing before it, or a range written backwards such as z-a. If you only meant to find ordinary text, turn the option off.
How can I replace line breaks?
In plain mode type \n in the “Find” box to match a line break and \n or \t in “Replace with” to insert one. In regular-expression mode \n works as it does in any JavaScript pattern.
Is it safe to use on private text?
Yes. The search and replacement happen in your browser and the text is never sent to a server or stored.