Find & Replace

Find every occurrence of a word or pattern in your text and replace it, with optional case-sensitivity and regex.

find-and-replace.js

Paste in a block of text, type what you want to find and what to replace it with, and the tool updates the text instantly. Turn on case-sensitive matching when capitalisation matters, or switch on regex mode to use pattern matching for more advanced find-and-replace jobs, like removing all digits or matching flexible word patterns.

How to use it

  1. Paste your text into the main box.
  2. Type the text (or regex pattern) you want to find.
  3. Type the replacement text.
  4. Toggle case-sensitive or regex mode if needed, then click Replace All.

Frequently asked questions

What does regex mode do?

It treats your 'find' field as a JavaScript regular expression instead of plain text, letting you match patterns like \\d+ for numbers or word boundaries.

Is the replace case-sensitive by default?

No, by default matching ignores case. Turn on the case-sensitive toggle to match exact capitalisation.

Can I undo a replacement?

Yes — just re-paste your original text, since replacements only affect the text currently in the box, not any saved file.