Find and Replace
Find and replace words or phrases in any text. Match case, whole words only, or use regular expressions with $1 backreferences.
replacements
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the Find and Replace
- 1 Paste your text into the left box.
- 2 Type what to find and what to replace it with, and choose the options.
- 3 Check the result on the right, then copy or download it.
About the Find and Replace
Find and Replace changes every occurrence of a word, phrase or pattern in your text at once. It works like the replace function in a word processor, but on any text you paste, without opening another program. The result updates while you type, and the counter shows how many replacements were made.
By default the search ignores uppercase and lowercase, so "cat" also finds "Cat". Tick "Match case" to find only the exact spelling, and "Whole words only" to skip matches inside other words: replacing "cat" then leaves "concatenate" alone. Words with accents are handled correctly.
With "Regular expression" you can search for patterns, such as all dates or all email addresses, using JavaScript regex syntax. In the replacement, $1 and $2 insert captured groups, $<name> a named group, $& the whole match and $$ a dollar sign. ^ and $ match at the start and end of every line. Use "Apply to text" to make several replacements one after another.
Frequently asked questions
Does it replace all occurrences or only the first?
All of them. Every match in the text is replaced at once, and the counter shows how many there were.
How do I replace only whole words?
Tick "Whole words only". The tool then only replaces matches that are not part of a longer word, so "art" does not change "start".
Can I use regular expressions?
Yes. Tick "Regular expression" and use JavaScript regex syntax. Use $1, $2 or $<name> in the replacement to insert captured groups. If the pattern is invalid, a message appears.
How do I make several replacements?
Make the first replacement, click "Apply to text" so the result becomes your new text, then enter the next search term.
Can I replace something with nothing?
Yes. Leave the replacement empty to delete every match from the text.