331+ free tools. No sign-up. No hidden fees. Explore the toolkit

Find and Replace Text

Renaming a product across a document, fixing a misspelled name in a hundred places, or swapping an old brand for a new one is exactly the kind of repetitive edit a tool should do for you.

Find and replace text in seconds — with case-sensitive matching, whole-word matching, and a regular-expression mode for pattern edits — and see exactly how many replacements were made.

Replacements Made

Save to Pinterest

How It Works

Find and replace scans your text for every occurrence of the search term and swaps each one for the replacement. By default the match ignores case, so searching for "fox" also matches "Fox" — turn on Match case when capitalisation matters, for example when replacing a name but not the same word in lowercase. If the text itself arrived in the wrong case, fix it first with the Case Converter. Whole words only adds word boundaries, so "cat" matches "cat" but not the "cat" inside "catalogue" or "scatter".

Regular expression mode treats the search term as a pattern instead of plain text. That unlocks edits plain search cannot do: \d+ matches any number, \s+ matches runs of whitespace, and (Mr|Ms|Mrs)\. matches any of three titles. In regex mode, $1, $2 and so on in the replacement insert captured groups, so a pattern like (\d{4})-(\d{2})-(\d{2}) replaced with $3/$2/$1 turns 2026-11-16 into 16/11/2026. An invalid pattern shows a clear error instead of changing anything. If a pattern is not behaving, test it first with the Regex Tester.

The result shows the edited text in full and the number of replacements made. If nothing matched, the count is zero and the text is unchanged — the tool never guesses. Everything runs in your browser, so drafts, code, and private documents are never uploaded.

Worked Example

In the example text "The quick brown fox jumps over the lazy dog. The fox is quick and the dog is lazy.", replacing "fox" with "cat" makes 2 replacements: both occurrences of "fox" become "cat", and nothing else changes. With Whole words only on, the same edit still makes 2 replacements — but searching for "dog" with whole-word matching on would match both "dog" occurrences and not the "dog" inside any longer word. With Match case on, searching for "The" matches only the two capital-T occurrences, not the lowercase "the".

How to Use This Tool

Paste your text, type what to find and what to replace it with, choose your matching options, and click Replace All.

  1. Paste your text. Any plain text works — a paragraph, a whole document, a list, or a block of code.
  2. Enter the find and replace terms. Leave the replacement empty to delete every match. In regex mode, the find field is a pattern and $1 style references work in the replacement.
  3. Choose matching options, then replace. Case-sensitive, whole-word, and regex options combine freely. The result appears below with the replacement count — use Copy Result to take the edited text.

The example on the page replaces "fox" with "cat" in the classic pangram sentence. Reset restores it.

Tips and Practical Advice

Find and replace is powerful precisely because it changes everything at once — which is also how it goes wrong. A few habits keep it safe.

Frequently Asked Questions

How do I find and replace text online?

Paste your text, type the word or phrase to find and its replacement, then click Replace All. The edited text appears below with a count of how many replacements were made — copy it with the Copy Result button.

What does whole-word matching do?

Whole-word matching only replaces the search term when it stands alone as a word. With it on, 'cat' matches 'cat' but not the 'cat' inside 'catalogue' or 'scatter'. Without it, every occurrence inside longer words is replaced too.

Can I use regular expressions?

Yes — tick Regular expression and the find field becomes a pattern: \d+ matches numbers, \s+ matches whitespace, and (a|b) matches either option. In the replacement, $1, $2 and so on insert captured groups. Invalid patterns show an error and change nothing.

Is my text uploaded anywhere?

No. The find and replace runs entirely in your browser with JavaScript. Your text is never sent to a server, stored, or seen by anyone else.

Last updated: