Find & Replace

Find every match, preview it highlighted, then replace all in one click - with match case, whole word and full regex support.

Preview (matches highlighted)

Find, preview, then replace

Unlike a browser's built-in find box, this tool shows you exactly what will change before you commit. As you type in the find box, every match lights up in the preview and a live counter tells you how many there are. Only when you are happy do you hit "Replace all", so there are no surprises and nothing is changed until you ask for it.

The three options

  • Match case - off by default, so "Apple" matches "apple". Turn it on to treat capitals and lowercase as different.
  • Whole word - matches only complete words. Finding "art" skips "start" and "party".
  • Regex - treats your search as a regular expression. Use \d+ for digits, ^ and $ for line ends, and capture groups referenced as $1 in the replacement.

Handy regex examples

Collapse multiple spaces into one: find \s{2,}, replace with a single space. Swap "Surname, First" into "First Surname": find (\w+),\s*(\w+), replace with $2 $1. Strip trailing whitespace: find [ \t]+$, replace with nothing. If a pattern is invalid, you will see a clear error rather than a broken result.

For pattern building and testing with capture-group inspection, the regex tester goes deeper. To dedupe a list use the duplicate line remover, and to change letter case in bulk try the case converter.

Frequently asked questions

How do I find and replace text online?
Paste your text into the box, type what you want to find and what to replace it with, then read the live match count and highlighted preview. Click "Replace all" to apply every change at once and copy the result.
How do I replace whole words only?
Tick "Whole word". Searching for "cat" will then match "cat" on its own but skip "category" or "scatter". It uses word boundaries so punctuation next to the word still counts.
Can I use regular expressions?
Yes. Tick "Regex" and your search box is treated as a JavaScript regular expression. You can use groups and reference them in the replacement as $1, $2 and so on. If the pattern is invalid you get a friendly error instead of a broken result.
How do I delete text rather than replace it?
Type what you want to remove in the find box and leave the replace box empty, then click "Replace all". Every match is deleted.
Is my text private?
Completely. The find and replace runs in your browser with JavaScript and nothing is uploaded, so you can safely clean up sensitive documents, code or personal notes.