Find and Replace Text Online: Plain and Regex

Search your text and replace every match, with a live count and highlighted preview.

Loading tool…

How to use the Find and Replace Text

  1. Paste your text into the first box.
  2. Type what to find and what to replace it with.
  3. Choose Match case, Whole word or Regular expression.
  4. Check the count and the highlighted matches, then copy the result.
  5. Use Replace first match only for one at a time, Undo to step back, Preserve case to keep Capitalised or UPPER style, and Download .txt to save.

About this tool

In plain mode, the text you type is matched literally, so characters such as dot or parentheses mean exactly what they look like. Match case makes the search case sensitive, and Whole word only matches complete words, so searching for cat leaves concat alone.

Regular expression mode uses JavaScript regex syntax. In the replacement you can use $1, $2 and so on for captured groups, $& for the whole match and $$ for a literal dollar. For example, finding (\w+)@(\w+) and replacing with $2 at $1 turns a@b into b at a. Invalid patterns show a clear error instead of breaking the page.

The match count and highlights update as you type, and nothing changes until you copy the result or press Apply to input. Apply to input lets you chain several replacements, Replace first match only changes one match at a time, and Undo steps back through the last 20 changes. Preserve case makes the replacement follow each match, so replacing cat with dog turns Cat into Dog and CAT into DOG. You can open a .txt file and download the result as .txt. Highlighting is limited to the first 2,000 matches in texts under 30,000 characters, although the replacement itself covers the whole text.

Frequently asked questions

How do I replace only whole words?

Tick Whole word. The match must not touch letters, digits or underscores.

How do I use capture groups?

Switch on Regular expression, put brackets around part of your pattern and refer to it as $1, $2 in the replacement.

Can I undo a replacement?

Yes. After Apply to input or Replace first match only, press Undo to go back (up to 20 steps).

Is my text sent anywhere?

No. All processing happens in your browser.

Need a custom tool or website?

IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.

Get a free quote

Have a project in mind?

Tell us what you need: a website, landing page, AI chatbot or automation. You get a clear scope and a fixed price within one working day. Free, no obligation.


  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions
  • avshack
  • DivineBamboo
  • goldleaf
  • janapril
  • kaizen
  • kwc
  • modv
  • pixelrush
  • revital
  • riderzplanet
  • sandsfashions