Text Tools

Find and Replace Text Online

Swap words, names or phrases throughout any text in one go. Match case, whole words only, or use regular expressions for advanced patterns, and see how many replacements were made.

AdvertisementAd slot: leaderboard-top

Embed this tool

Put this free Find and Replace on your own website — copy the code below and paste it into your page's HTML.

AdvertisementAd slot: in-content

How to find and replace text

  1. Paste your text in the top box.
  2. Type what to find and what to replace it with. Matches are highlighted and counted as you type.
  3. Adjust the options, then copy the result. "Use result as new text" lets you chain several replacements.

Find and replace options

Match case makes "Acme" and "acme" different. Whole words only stops partial matches, so replacing "cat" will not change "category". Both are essential when you are renaming a person, product or variable throughout a document.

Regular expressions handle patterns rather than exact text. For example, \s+ finds any run of spaces, (\w+)@example\.com captures the user part of email addresses so you can write [email protected] in the replacement, and ^ matches the start of every line, useful for adding a prefix to a list. Test patterns with our regex tester if you are new to them.

Leave "Replace with" empty to delete every match. Everything runs in your browser, so you can safely clean up confidential documents, data exports and code.

Need a different tool? Suggest it here — we read every message.

Frequently asked questions

How do I delete text everywhere?

Leave "Replace with" empty. Every match is removed.

Can I replace line breaks?

Yes. Turn on regular expressions and search for \n. Replace with a comma and space to turn a list into one line.

What does $1 mean?

With regular expressions on, $1, $2 and so on insert the text captured by the first, second, … parentheses group in your pattern.

Is there an undo?

The original text is never changed until you click "Use result as new text", so you can always start over.

Related tools & templates

AdvertisementAd slot: footer-leaderboard