tools.now

Find and Replace

Replace every occurrence of a word or pattern in a block of text. Plain search is literal; switch on regular expressions for patterns and capture groups.

Output

🔒 Runs in your browser. Your data is never uploaded.

How to use

  1. Paste your text.
  2. Enter what to find and what to replace it with.
  3. Copy the result; the status line counts the replacements.

Plain mode versus regex mode

In plain mode every character is taken literally, so searching for “a.b” does not match “axb” and a replacement of “$1” is inserted as written. In regex mode the search uses JavaScript regular expression syntax, and the replacement may use $1, $2 for capture groups and \n or \t for a line break or tab.

Frequently asked questions

How do I replace line breaks?
Turn on Regular expression and search for \n. Replace with a space to join lines, or search for a comma and replace with \n to split a list onto separate lines.
What does “Whole words only” do?
It skips matches that are part of a longer word, so replacing “cat” leaves “concatenate” alone.
Can I swap the order of two parts?
Yes, with capture groups. Searching for (\d+)-(\d+) and replacing with $2-$1 turns 12-34 into 34-12.

Related tools