Find and Replace Text Online

Enter what to find and what to replace it with — the result updates instantly.

Your text and files never leave your browser — nothing is sent to a server.

How to use

  1. Paste your text, then fill in “Find” and “Replace with”. The result appears on the right.
  2. Turn on “Whole words only” so that searching for cat leaves category alone.
  3. With “Regular expression” on, use patterns like \d+, insert captured groups with $1 and $2, and type \n for a line break.
  4. The number of replacements is shown below the result. Click “Copy” when it looks right.

FAQ

How do I replace commas with line breaks?

Turn on “Regular expression”, put , in Find and \n in Replace with. To join lines with commas instead, put \n in Find and , in Replace with.

What does $1 mean?

It is the text matched by the first pair of parentheses in the pattern. Replacing (\d+)-(\d+) with $2-$1 swaps the two numbers. Write $$ for a literal dollar sign.

What happens to special characters when regex is off?

Characters such as . * ? ( ) are matched literally, and a $ in the replacement is inserted as is.

Related tools

All tools