Find and Replace
Find words or patterns and replace them across your text.
Replace words across a whole document
The Find and Replace tool searches your text for a word, phrase or pattern and swaps every match for something new. It is perfect for changing a product name throughout a description, fixing a repeated typo, swapping commas for line breaks or updating dates in a template. You see how many matches were replaced so you know exactly what changed.
How to use find and replace
- Paste your text into the main box.
- Type the text you want to find and the text you want to replace it with.
- Choose options such as match case, whole words only or regular expression.
- Click Replace all and copy the updated text.
Options
- Match case only replaces matches with the same capital letters.
- Whole words only replaces “cat” but not “category”.
- Regular expression lets advanced users search for patterns, such as all numbers with
\d+or all email addresses. - Special characters: type
\nin the replace box to insert a new line and\tfor a tab.
Handy examples
Turn a comma separated list into one item per line by finding , and replacing with \n. Remove double spaces by finding two spaces and replacing with one. With regular expressions you can reorder text too: find (\w+) (\w+) and replace with $2 $1 to swap pairs of words.
The tool runs entirely in your browser, works on mobile and desktop, and never stores your text.
Frequently asked questions
What regular expression syntax is supported?
The tool uses standard JavaScript regular expressions, including groups, character classes and lookaheads. Use $1, $2 and so on in the replacement to insert captured groups.
How do I replace with a line break?
Type \n in the replace field. The tool converts it to a real new line. Use \t for a tab.
Can I undo a replacement?
Your original text stays in the input box and the result appears separately, so you can always adjust and run it again.