Find and Replace Text

Swap one word for another everywhere at once, across thousands of lines. Match case, whole words only, or use a regular expression — nothing is uploaded.

Result


          

Type something to find.

How to use it

  1. Paste your text into the box on the left.
  2. Type what you are looking for in Find, and what should take its place in Replace with.
  3. Every match is swapped as you type, and the line under the result tells you how many were changed.
  4. Press Copy result when it looks right.

The three options, in plain language

Match case is off by default, so searching for london also finds London and LONDON. Turn it on when capitalisation is the whole point — renaming a variable in code, for instance, where Total and total are two different things.

Whole words only is the option that saves you from the classic mistake. Replacing cat with dog without it will quietly turn category into dogegory. With it on, only the standalone word is matched.

Use a regular expression is for patterns rather than fixed text. \d+ finds any run of digits, \s+ any run of spaces, and \n a line break. In the replacement box, $1 puts back whatever the first bracketed group captured, so finding (\w+)@(\w+) and replacing with $2 keeps only the part after the @ sign. If the pattern is not valid, the tool tells you instead of silently doing nothing.

Frequently asked questions

How do I replace a line break?

Tick Use a regular expression and search for \n. You can also use \t for a tab and \s for any space. To join every line instead, the Remove Line Breaks tool is simpler.

What does whole words only do?

It stops a search for cat from matching the cat inside category or concatenate. It only matches when the text has a word boundary on both sides.

How do I delete text instead of replacing it?

Leave the Replace with box empty. Every match is removed and the counter still tells you how many were found.

Is my text sent anywhere?

No. The replacing happens in JavaScript inside your own browser. Nothing is uploaded and nothing is saved — close the tab and the text is gone.

Related tools