Skip to content
NMSnabbit.

Find and Replace Text

Search and replace text with plain or regular-expression matching.

Text Tools Runs in your browser

What is find and replace?

Renaming a function across a pasted file, or fixing a typo that appears forty times? Enter the search term and its replacement, and every match swaps out with a running count of replacements. Regex mode unlocks JavaScript patterns with capture groups, so replacing “(\d+)px” with “$1rem” converts units in bulk. Matching happens on your own machine, which makes it safe for config files and credentials.

How to use the Find and Replace

  1. 1 Paste the source text you need to edit.
  2. 2 Fill in the find field and the replacement field.
  3. 3 Switch on regex, match case or replace all to control matching.
  4. 4 Note the replacement count, then copy the updated text.

What you can use it for

  • Bulk-editing names, paths or URLs.
  • Reformatting data with regular expressions.
  • Replacing placeholders in templates.
  • Cleaning up imported text.

Frequently asked questions

Does it support regular expressions?
Yes. Turn on the regex toggle and the find field accepts any JavaScript pattern. Capture groups carry into the replacement, so finding “(\w+)@example.com” and replacing with “[email protected]” migrates a whole list of addresses.
How many matches can it replace?
All of them, when “replace all” is on, and the counter reports the exact number. Switch it off to change only the first hit, which is safer for one-off fixes.
What happens with an invalid regex?
An unparseable pattern produces an error and leaves your text untouched. Fix the pattern and the replacement re-runs against the original input.

Related tools

More Text Tools

More tools like this:

All Text Tools