Find and Replace

Find and replace text in your browser with options for regular expressions, match case and whole word. Shows how many replacements were made. Free.

Input
Result

About Find and Replace

Find and Replace changes every match of a word or pattern in your text at once, and tells you how many replacements were made.

Whole word and match case

Turn on Whole word so replacing cat does not change concatenate. Match case keeps Cat and cat apart.

Regular expressions

Turn on Regular expression for patterns: \d+ replaced with # turns a1 b22 into a# b#. Invalid patterns show the reason.

Delete text

Leave Replace empty to remove every match.

No undo

Keep a copy of important text before replacing.

Good for

Fixing a name across a document, rewriting config or log text, and cleaning pasted data.

Private

Your text stays in your browser. Nothing is uploaded.

How to use Find and Replace

  1. Paste your text or open a file.
  2. Type what to find and what to replace it with.
  3. Tick Regular expression, Match case or Whole word if needed.
  4. Check the number of replacements, then copy or download the result.

Help & FAQ

What does Find and Replace do?

It replaces every match of a word or pattern in your text and shows how many replacements were made.

Is the search case sensitive?

Not by default. Tick Match case to make it case sensitive. In the test cat matched CAT until Match case was ticked.

What does Whole word do?

It matches only complete words. In the test cat no longer changed the middle of concatenate.

Can we use regular expressions?

Yes. Tick Regular expression. Patterns such as \d+ and groups such as (\w+) (\w+) worked in the tests.

How do we use captured groups in the replacement?

Write $1, $2 and so on. In the test $2, $1 turned John Smith into Smith, John.

How do we match a line break?

Turn on Regular expression and use \n in the pattern. In plain mode \n is just two characters.

Are special characters like a dot treated literally?

In plain mode yes. Replacing . only changed dots, not every character.

What happens with an invalid pattern?

You see Invalid regular expression with the reason, for example Unterminated group, and the text is not changed.

What if the Replace box is empty?

The matches are deleted. The surrounding spaces stay, so you may need to tidy them.

Is there an undo?

No. Keep a copy of your original text, or paste it back to start again.

How many replacements can it do?

As many as there are matches. The page tells you the count after each change.

Is our text uploaded?

No. The replacing happens in your browser.

More in Text Tools

See all 21 in Text Tools