How does find and replace work?
Find and replace searches your text for a word, phrase or pattern and swaps every match with new text. Paste your text, type what to find and what to replace it with, and the result updates instantly with the number of replacements. You can match case, replace whole words only or use regular expressions with capture groups such as $1. The tool works in your browser, so private documents stay on your device.
How to find and replace text online
- 1
Paste your text into the input box.
- 2
Type the text to find and the replacement text.
- 3
Turn on Match case, Whole word or Regular expression if you need them.
- 4
Copy or download the updated text.
Key features
Regular expressions
Use patterns, groups and references such as $1 for advanced replacements.
Match case and whole word
Avoid replacing parts of other words, such as “cat” inside “category”.
Match counter
See how many replacements were made before you copy the result.
Settings remembered
Your last find and replace values are saved on your device for the next visit.
Frequently asked questions
How do I replace all occurrences of a word?
Enter the word in Find and its replacement in Replace with. All occurrences are replaced at once, and the counter shows how many.
How do I use regular expressions?
Turn on Regular expression and write a JavaScript pattern, such as \d+ for numbers. In the replacement text you can use $1, $2 for capture groups and $& for the whole match.
How do I replace line breaks?
With Regular expression on, find \n and replace it with a space or any text. For simple cases you can also use the Remove Line Breaks tool.
What does whole word mean?
Whole word only matches the text when it is not part of a longer word, so “art” will not match “party”.
Can I leave the replacement empty?
Yes. An empty Replace with field deletes every match, which is a quick way to remove a word or a pattern from a text.