What is an online find and replace tool?
Find and replace swaps every occurrence of a word, phrase or pattern in a block of text for something else. It is the quickest way to fix a repeated typo, rename a variable in a snippet, switch http:// links to https://, reformat dates or phone numbers, or clean up data exported from a spreadsheet or CMS — without opening an editor.
This tool highlights every match as you type, so you can see exactly what will change before you copy the result. Plain-text mode treats your search literally, while regular expression mode unlocks patterns, capture groups ($1, $<name>) and the multiline and dot-all flags. Whole-word matching is Unicode-aware, so it works for accented and non-Latin words too.
For bigger clean-ups, switch to Multiple rules. Each rule runs on the output of the previous one, top to bottom, so you can build a repeatable pipeline — normalise quotes, then strip tracking parameters, then rename a domain. Everything runs locally in your browser.
How to use the Find and Replace
- Paste your text into the Text box.
- Type what to find and what to replace it with. Leave Replace with empty to delete matches.
- Set options: case sensitivity, whole words, regular expressions, and whether to replace all matches or only the first.
- Check the highlighted matches and the match count, then copy or download the result.
- Need several replacements? Choose Multiple rules, add rows, and reorder them with the arrows.
Example: reformat phone numbers with capture groups
With Regular expression enabled, find (\d{3})-(\d{4}) and replace with ($1) $2:
Before: Phone: 555-0142, Fax: 555-0199
After: Phone: (555) 0142, Fax: (555) 0199Replacement patterns in regex mode
$1,$2… — the text captured by the first, second … group.$<name>— a named group, e.g. find(?<year>\d{4})-(?<month>\d{2})and replace with$<month>/$<year>.$&— the whole match, useful for wrapping: replace\bTODO\bwith[$&].$$— a literal dollar sign.- Tick Interpret escape sequences to use
\n(new line) and\t(tab) in the replacement, for example to put every comma-separated item on its own line.
Tips
In plain-text mode special characters such as ., * and $ have no special meaning, so you can search for $price or a.b safely. Test complex patterns first with the Regex Tester.
Very large inputs are fully processed, but the highlighted preview is capped to keep the page responsive. A badly written pattern with nested quantifiers (such as (a+)+$) can still take a long time on some input — simplify it if the page becomes slow.
Frequently Asked Questions
How do I replace text across multiple lines?
Enable Regular expression and Dot matches newlines so . can cross line breaks, or match line breaks explicitly with \n. In plain-text mode, tick Interpret escape sequences and type \n in Find.
How do I replace only whole words?
Tick Whole words only. Searching for cat then ignores category and concatenate, but still matches cat, Cat. and (cat).
Why does my regular expression show an error?
The pattern is not valid JavaScript regex syntax — often an unclosed bracket or parenthesis, or a quantifier with nothing before it, like *abc. The error message explains what the browser could not parse; that rule is skipped until it is fixed.
Can I delete text instead of replacing it?
Yes. Leave Replace with empty and every match is removed. To remove repeated lines specifically, the Duplicate Line Remover is faster.
Is there a limit on text size?
There is no fixed limit; several megabytes work on most devices. For big inputs the result updates shortly after you stop typing, and the highlighted preview shows the first part of the text.