Skip to content
Free text tool

Find and replace text

This tool finds a word, phrase or pattern in your text and replaces it, then tells you how many replacements it made. Writers, editors and developers use it to fix names, clean data and update repeated text in one step.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

68 characters

Leave blank to delete matches

Result

Replaced 3 matches.

The dog sat on the mat. The dog was happy.
Concatenate is not a dog.

Example

Input
The cat sat on the mat. The cat was happy.
Concatenate is not a cat.
Result
Replaced 3 matches.

The dog sat on the mat. The dog was happy.
Concatenate is not a dog.

How to use the find and replace text

  1. Paste your text into the Text to search box.
  2. Type what to look for in Find and the new text in Replace with.
  3. Pick a Search mode and set Match case, Whole words only and Replace.
  4. Press Run, then Copy result.

How it works

Plain text mode finds the exact text you type. Regular expression mode uses JavaScript regex syntax, and Replace with can use $1 for groups, $& for the whole match, and \n or \t for a new line or tab.

Whole words only skips matches that are part of a longer word, so cat does not change concatenate. It works with letters from any language.

The result starts with a line saying how many matches were replaced, followed by the new text.

Find is limited to 300 characters, and searches with more than 100,000 matches are stopped. A repeated group that contains | or another repeat, such as (a|b)+ or (a+)+, is rejected because it can freeze the page; use a character class like [ab]+ instead.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

How do I replace all instances of a word?

Enter the word in Find and the new word in Replace with, keep Replace set to All matches and press Run.

Can I use regular expressions?

Yes. Set Search mode to Regular expression. You can capture groups with parentheses and use them in the replacement as $1, $2 and so on.

How do I delete a word from text?

Leave Replace with blank. Every match is removed.

Is the search case sensitive?

Not by default. Set Match case to Yes to treat Cat and cat as different.

All 220 SnowRock tools