Text Replacer — Find and Replace Online

Find and replace words or phrases in any text: bulk-replace several terms at once, replace whole words while keeping their capitalisation, or use regular expressions. Runs in your browser — nothing is uploaded.

Find and replace text in three steps

  1. Paste your text into the left box.
  2. Type what to find and what to replace it with. Need to change several words at once? Press + Add another pair; the pairs run top to bottom, each on the result of the one before.
  3. Tick the options you need. The result and the number of replacements update as you type; copy it, download it as a .txt file, or feed it back in for another pass.

Word replacer: change whole words and keep their case

The Word replacer tab switches on Whole words only and Keep capitalisation. Replacing cat with dog in “The cat sat. Cat! CATS? catalog” gives “The dog sat. Dog! CATS? catalog” — Cat becomes Dog, an all-caps match would become DOG, and catalog and CATS are left alone because they are different words. Word boundaries are Unicode aware, so accented words such as café are matched as a whole too.

What each option does

OptionEffectExample
Match caseOff by default, so the search is case-insensitive.color finds Color only when off.
Whole words onlyA match must not be part of a longer word.art does not touch party.
Keep capitalisationCopies the case pattern of each match onto the replacement.Cat → Dog, CAT → DOG.
Regular expressionThe find field is a JavaScript regex; use $1, $2, $& or $<name> in the replacement.(\w+)@(\w+) → $2 at $1
MultilineWith regex on, ^ and $ match at the start and end of every line.^ → - bullets every line.
Interpret \n and \tTurns the two-character sequences into a real line break or tab.Replace , with \n to split a list.

Useful regular-expression replacements

GoalFindReplace
Collapse repeated spaces {2,}a single space
Swap “Last, First”(\w+), (\w+)$2 $1
Wrap every line in quotes^(.*)$ (multiline)"$1"
ISO date to US date(\d{4})-(\d{2})-(\d{2})$2/$3/$1
Remove trailing spaces[ \t]+$ (multiline)(leave empty)

Leave the replace field empty to delete every match. Without the regex option, characters such as ., * and $ are matched literally, so you can search for $9.99 directly.

Common questions

How do I find and replace text online?

Paste the text, type the word or phrase to find and its replacement, and the result appears immediately with a count of how many replacements were made. Use + Add another pair to bulk-replace several different words in one pass.

How do I replace a word without changing words that contain it?

Use the Word replacer tab or tick Whole words only. Replacing cat then leaves catalog and concat untouched.

Can the replacement keep the original capitalisation?

Yes. With Keep capitalisation on, Cat becomes Dog, CAT becomes DOG and cat becomes dog from a single cat → dog rule.

How do I use regex capture groups in the replacement?

Tick Regular expression, wrap parts of the pattern in parentheses and refer to them as $1, $2 and so on. (\w+)@(\w+) with $2 at $1 turns ada@example into example at ada.

Is the search case-sensitive?

Not by default: color also matches Color and COLOR. Tick Match case to replace only the exact capitalisation you typed.

How do I replace text with a line break?

Type \n in the replace field and tick Interpret \n and \t in replacement. Replacing , with \n puts each item of a comma-separated list on its own line.

Is my text uploaded anywhere?

No. The find and replace runs entirely in your browser with JavaScript string and RegExp functions, so private documents never leave your device.