Find and Replace Text
Find and replace is the fastest way to fix a name spelled wrongly twenty times, change a word across a long draft, or clean up pasted data. This free tool works on any text you paste in, shows how many changes it made, and never uploads your text anywhere. Everything runs inside your browser, so confidential drafts stay on your device.
How to use it
- Paste or type your text into the first box.
- Type the word or phrase to look for in the Find field.
- Type the replacement in the Replace with field. Leave it empty to delete every match.
- Tick Match upper and lower case exactly if “Cat” and “cat” should be treated as different words.
- Tick Whole words only if you want “the” to change but not the “the” inside “thesis”.
- Press Replace all, then copy the result from the Result box. The line above it tells you how many replacements were made.
Worked example
| Setting | Value |
|---|---|
| Text | The cat sat on the mat. The Cat ran away. |
| Find | cat |
| Replace with | dog |
| Case matching | Off |
| Result | The dog sat on the mat. The dog ran away. (2 replacements) |
With case matching switched on, only the lowercase “cat” is changed and the result reads “The dog sat on the mat. The Cat ran away.” with 1 replacement. Switching whole-word mode on for the text “then the thesis. The end” and searching for “the” gives 2 replacements, because the “the” inside “then” and “thesis” is left alone.
Using regular expressions
- Tick the regular expression option when the pattern matters more than the exact words. For example, searching for ([a-z])(\d+) in the text “a1 b22 c333” and replacing with $2$1 swaps each letter and number, giving “1a 22b 333c” with 3 replacements.
- In regular expression mode, $1, $2 and so on refer to the bracketed groups from your search pattern.
- If the pattern is not valid, for example an unclosed bracket, the tool tells you instead of failing silently.
Plain text mode is literal
When regular expressions are off, every character you type is searched for literally. A full stop, a dollar sign or a bracket means exactly that character. Replacement text is also literal, so a replacement such as “$5 & $&” appears exactly as typed. This avoids the surprises many editors cause when special characters are read as commands.
Where people use it
- Correcting a customer name or product code across an email template.
- Changing British spellings to American ones in an essay.
- Removing a repeated phrase by replacing it with nothing.
- Preparing lists, by replacing commas with line breaks pasted into the Replace field.
- Updating old dates or prices in a long document before you publish it.
Tips for safer bulk changes
Before replacing, read the Find box once more and check whether the word could appear inside other words. A short search such as “art” would also hit “party” and “start” unless whole-word mode is on. After the run, scan the Result box for the first and last change to make sure nothing unexpected happened, and compare the replacement count with what you expected. If you counted five mentions of a name and the tool reports seven, there are two you did not notice, perhaps in a different case.
For multi-step edits, run one replacement, copy the result back into the first box, and run the next one. Doing changes one at a time makes mistakes easy to trace and lets you stop the moment a result looks wrong.
Common mistakes to avoid
- Forgetting that case matching is off by default, so capitalised words change too.
- Replacing a short word without whole-word mode, which also edits longer words that contain it.
- Using regular expression mode with ordinary text that contains dots or brackets.
- Not checking the replacement count. A count of 0 usually means a typo in the Find field.
- Closing the page before copying the result, since nothing is stored.
Frequently asked questions
Is my text sent to a server?
No. The replacement runs in your browser using JavaScript, and the text is never transmitted or stored.
Can I replace with nothing?
Yes. Leave the Replace with field empty and every match is deleted.
How long can the text be?
Up to one million characters, which is far more than a typical long document.
Does it change my original text?
No. The original box stays as it is and the changed version appears in the Result box.
Can I replace line breaks?
Use our remove line breaks tool for that, or paste a line break into the Find field.
Related tools and guides
This tool is provided for general use. Always keep a copy of your original text before making bulk changes.