Skip to main content
WizTools123
Free Online Tools

Tool Categories


Text Tools New Tool

Find and Replace Text Free Online with Regex and Multiple Rules

Replace one thing with another across a whole text, or run a list of replacements in one pass. Match whole words only, respect case, or switch on regular expressions with capture groups for patterns. Every run tells you how many replacements it made before you copy anything.

Free Forever Nothing Uploaded Regex Support Many Rules at Once
Find and Replace Text Free Online with Regex and Multiple Rules
Share this tool
Find and Replace Text Everything happens in this tab. Nothing you paste is sent anywhere.
Your text
0 characters 0 words 0 lines
After the replacements
0 characters 0 lines
Find replace with
  Rules run top to bottom, in one pass.
How to match

In this mode \d is any digit, \s any space, . any character, and + means one or more. Brackets capture, so (\w+) (\w+) with $2 $1 swaps two words around.

0 replacements made, from 0 rules.

Buy Us A Coffee

Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

Buy Us A Coffee

How to Use Find and Replace Text

Step by step, start to finish.

1
Paste your text

On the left. Your original stays there untouched while the result builds on the right.

2
Fill in a rule

What to look for, and what to put instead. Leaving the second box empty deletes what you found.

3
Add more rules if you need them

They run top to bottom in a single pass, so a later rule works on the result of the earlier ones.

4
Check the count, then copy

The number of replacements is shown under the rules. A zero means the match never happened, not that the tool did nothing.

Key Features

What this tool does, and what it does not do.

Many rules, one pass

Add as many find and replace pairs as you need; they run top to bottom.

Regular expressions

Capture groups work with $1, $2 and so on, and a pattern with a typo shows a clear error message.

Whole words and case

Match cat without touching category, or match Apple but not apple.

It counts what it did

The number of replacements is always shown, including zero.

Live as you type

The result updates while you edit the rules, so you see the effect before you copy.

Nothing uploaded

The text and the rules both stay in your tab.

About Find and Replace Text

Find and replace is in every editor, built for one change at a time inside the document itself. When you have twenty substitutions to make across a block of text, that means twenty rounds of the same dialog box and a check of the result after each one.

This does the whole set at once. Each rule is a row, the rules run top to bottom in a single pass, and the result appears beside your original rather than on top of it. The number of replacements is on screen the whole time, so a rule that matched nothing is obvious straight away.

The default is deliberately literal. Nothing you type in the search box is treated as a pattern unless you switch on regular expressions, so a search for a price with a dollar sign in it, or a sentence with brackets, works without escaping anything. When you do want patterns, the switch is right there and the capture groups work the way they do everywhere else.

Frequently Asked Questions

Common questions about this tool.

Put what you want gone in the find box and leave the replace box empty. Everything that matches is removed, and the count tells you how many went.

Because rules run in order and each one works on the result so far. Replacing cat with dog and then dog with fox makes every original cat a fox. Type the rules in the order you want them to run, or run the first set, press Use as input, and then run the second set.

Not unless regular expressions are switched on. By default a full stop, a bracket, a dollar sign and everything else are treated as ordinary characters. Turn the switch on and they become pattern syntax, which is when escaping matters.

Switch on regular expressions, put brackets around the part you want to keep, and use $1 for the first bracket, $2 for the second. Searching for (\w+) (\w+) and replacing with $2 $1 swaps every pair of words. Outside regex mode, $1 stays as the literal text $1.

Yes, in regex mode: type \n in the find box to match a line break, so a\nb finds an a at the end of one line and a b at the start of the next. Plain mode matches the text exactly as typed in the one-line box, so for line breaks either switch on regular expressions or join the lines first with the Remove Line Breaks tool.

More Text Tools

Other tools from the same hub, free and in your browser.

All Text Tools

Feedback

No feedback on this tool yet. Yours would be the first.