Skip to content
Free online tool

Find and replace text online

Find every occurrence of a word or phrase and replace it in one go. Match case, match whole words only or use regular expressions, preview highlighted matches and see exactly how many were replaced.

Preview of matches

How to find and replace text

  1. Paste your text into the main box.
  2. Type what to find, and what to replace it with. Leave the replacement empty to delete every match.
  3. Tick Match case or Whole words only if needed. The preview highlights matches and shows the count.
  4. Click Replace all, check the result, and click Undo if something went wrong. Copy the final text.

Precise matching options

By default, search ignores capitalisation, so “cat” finds “Cat” and “CAT”. Match case makes it exact. Whole words only stops “cat” matching inside “catalog” or “concatenate”, and it works with letters from any language, not just English. Special characters like brackets, dots and plus signs are treated literally, so searching for (a+b) finds exactly that text.

For advanced users, Regular expression mode supports full JavaScript regex patterns and replacement groups such as $1. If a pattern is invalid, you get a clear message instead of a frozen page. All processing happens in your browser.

Examples

Find and replace FAQ

Can I replace text with a line break?

Not at the moment. The replace box is a single line, so it can’t insert line breaks. You can still remove line breaks by turning on regular expression mode and finding \n.

Is there a limit on matches?

The preview highlights up to 5,000 matches to stay fast. Replace all changes every match.

Can I undo a replacement?

Yes. Undo restores the text from before your last Replace all.

Related tools

More Text Tools

Need another tool?

Browse all 50 free tools for PDFs, images, text, SEO, calculations and development.

Explore All Tools