TheFileTools

How to find and replace text online

Change a word, a name or a pattern everywhere in a text at once, with or without regular expressions.

A name is spelled wrong forty times, a product has been renamed, every date needs a different format. Changing them one at a time invites mistakes.

Steps

  1. Open Find and replace.
  2. Paste the text into the large box.
  3. Type what to look for in Find and the new text in Replace with.
  4. Check the result and the counter under it, which shows how many replacements were made, then press Copy.

Every match is replaced at once. There is no step-by-step confirmation, but your original stays in the input box, so nothing is lost if the result is wrong. Leave Replace with empty to delete every match.

The two checkboxes

  • Match upper/lower case is off at the start, so searching for color also changes Color and COLOR. All of them receive the replacement exactly as you typed it. Tick the box to change only the exact spelling.
  • Use a pattern (regex) treats Find as a regular expression. With the box off, characters such as the full stop, brackets and the question mark are ordinary characters.

Whole words and other patterns

A plain search matches inside longer words: replacing cat also changes concat. With the pattern box ticked, \bcat\b matches the whole word only.

Round brackets capture parts of a match, and $1 to $9 put them back in the replacement, with $& standing for the whole match. Find (.+), (.+) and replace with $2 $1 to turn Smith, John into John Smith on every line. Find (\d+)-(\d+)-(\d+) and replace with $3.$2.$1 to turn 2026-11-30 into 30.11.2026.

The Find field is a single line. To match a line break, tick the pattern box and write \n in Find. A line break cannot be typed into Replace with, so to join lines use Remove line breaks. An invalid pattern shows a message and no result.

To check what a replacement changed, paste both versions into Compare two texts.