Find and Replace
Find and replace text in bulk, with match case, whole words, and regular expressions with capture groups.
Runs in your browser. Nothing is uploaded.
Tip: use \n in “Replace with” for a new line. With regular expressions, $1 inserts the first captured group.
How to use the Find and Replace
- Paste your text into the left box, or open a text file.
- Type what to find and what to replace it with. The result updates as you type.
- Tick Match case, Whole words only or First match only to narrow the replacement.
- Tick Regular expression for patterns, and use $1, $2 in the replacement for captured groups.
- Check the number of replacements, then copy or download the result.
Replace text in bulk, safely
Renaming a product throughout a document, fixing a misspelt name, changing a URL in a list of links, swapping commas for line breaks: these jobs are quick with find and replace, but easy to get wrong when a word appears inside other words or in different capitalisation. This tool shows the result immediately, together with the number of replacements, so you can check before you copy.
Options that prevent mistakes
- Match case replaces only text with exactly the same capitals
- Whole words only skips matches inside longer words, so “Pro” won’t change “Product”
- First match only replaces just the first occurrence
- Regular expression switches from plain text to patterns
In plain-text mode, every character is taken literally, including dots, brackets and dollar signs, so you never need to escape anything.
Patterns when you need them
With Regular expression ticked, you can find things that vary: any run of digits (\d+), the start
of every line (^), or text in a particular shape. Parentheses capture parts of a match, which you can
rearrange in the replacement. For example, find (\w+), (\w+) and replace with $2 $1 to turn
“Okafor, Amara” into “Amara Okafor”.
Use \n and \t in the replacement for new lines and tabs, in either mode.
Built to never freeze
A badly formed pattern can make a browser hang. Here, every search runs in a background worker with a time limit, so if a pattern would take too long, it’s stopped with a clear message instead of locking the page. Your text never leaves your device.
Frequently asked questions
How do I replace a word without changing longer words that contain it?
Tick Whole words only. Replacing "cat" then leaves "category" and "bobcat" untouched. Word boundaries work for letters in any language, not just English.
Can I insert a line break?
Yes. Type \n in the Replace with box for a new line and \t for a tab. For example, replacing ", " with \n turns a comma-separated list into one item per line.
What can I do with regular expressions?
Find patterns rather than fixed text, such as any number, any email address or text at the start of every line. Wrap parts in parentheses to capture them, then reuse them in the replacement as $1, $2 or $<name>. Build and test complex patterns first in the Regex Tester.
Why are $ signs in my replacement kept as they are?
In plain-text mode, the replacement is used literally, so prices like $5 stay intact. $1-style references only work when Regular expression is ticked.
Is my text uploaded?
No. All searching and replacing happens on your device, in a background worker that is stopped if a pattern takes too long.
Tutorials
How to rename a product throughout a document
Replace a product name everywhere in your text, including different capitalisations, without touching longer names that contain it.