Find and replace
Find and replace text online with several rules at once. Plain text or regex with backreferences ($1), whole words, case sensitivity and a replacement count.
Your text is processed in your browser and never sent to our server.
0 characters · 0 words · 0 lines
How to find and replace text online
Replace a word, a phrase or a pattern in any text in one go – no Word or code editor needed. The result and the number of replacements update as you type.
- Paste your text into the left box.
- Type what to find and what to replace it with. Leave “Replace with” empty to delete the matches.
- Need more changes? Click Add another rule – the rules run from top to bottom, each one on the result of the previous one.
- Copy or download the result.
- Plain text mode finds exactly what you type; characters like . * ( ) have no special meaning.
- Regular expression mode uses JavaScript regex syntax. Use groups and refer to them with $1, $2 or lt;name> in the replacement; amp; inserts the whole match and $ a dollar sign.
- Case sensitive – “Cat” and “cat” are treated as different.
- Whole words only – “cat” will not match inside “category”. Works with accented letters too.
- Replace all – turn off to replace only the first match of each rule.
- \n and \t – type \n for a line break and \t for a tab (\ for a backslash).
- ^ and $ match at every line – in regex mode ^ means “start of a line”, handy for adding text to every line.
Examples
Turn a comma-separated list into lines (plain mode, find , and replace with \n):
apples,pears,plums → apples pears plums
Swap first and last name (regex mode, find (\w+) (\w+), replace with $2, $1):
John Smith Jane Doe → Smith, John Doe, Jane
Change dates from 2026-11-10 to 10.11.2026: find (\d{4})-(\d{2})-(\d{2}), replace with $3.$2.$1.
Frequently asked questions
How do I find and replace in Word, Excel or Google Docs?
Press Ctrl+H (Cmd+Shift+H in Google Docs on Mac). Word supports wildcards via “More → Use wildcards”, Google Docs and Google Sheets have a “Match using regular expressions” checkbox. In Excel formulas use =SUBSTITUTE(A1, "old", "new"). This tool is faster when you need several rules at once or want to see the count first.
How do I replace line breaks?
Keep “\n and \t mean new line / tab” on and type \n into the Find field. For example find \n and replace with , to join lines into one comma-separated line.
Why does my regular expression show an error?
The pattern is not valid JavaScript regex – usually an unclosed bracket or a lone ( or [. To search for these characters literally, escape them with a backslash (\() or switch to plain text mode.
Is my text uploaded anywhere?
No. The replacement runs in your browser; your text never leaves your computer.
Can I just clean up spaces or remove lines?
Yes, there are dedicated tools: trim text removes extra whitespace, and remove lines containing deletes whole lines with a word.