About the Find and Replace
Replace every occurrence of a word, phrase or pattern in your text at once. Match whole words only, ignore case, or use regular expressions with $1 capture groups.
Key features
- Replace all occurrences at once with a live preview
- Case-insensitive and whole-word matching
- Regular expressions with $1 and $<name> capture groups
- Insert new lines and tabs with \n and \t
- Shows how many replacements were made
- Works with large texts, entirely in your browser
Find and replace across your whole text
Fix a misspelled name throughout a document, update a product code in a list, swap date formats or clean up exported data, all in one step. The result updates as you type, so you can see the effect before copying it.
Examples
| Find | Replace | Options | Effect |
|---|---|---|---|
colour | color | Whole words | British → American spelling |
, | \n | — | One item per line |
[ \t]+$ | (empty) | Regex | Strip trailing spaces on every line |
(\d{4})-(\d{2})-(\d{2}) | $3/$2/$1 | Regex | 2026-10-20 → 20/10/2026 |
^ | - | Regex | Add a bullet to every line |
" | ' | — | Switch double quotes to single |
Regular expression basics
| Pattern | Matches |
|---|---|
\d | Any digit |
\w | Letter, digit or underscore |
\s | Whitespace |
. | Any character except a new line |
+ / * / ? | One or more / zero or more / optional |
^ / $ | Start / end of a line |
[abc] | Any one of a, b or c |
( … ) | Capture group, reused as $1, $2… |
Regular expressions use JavaScript syntax with the m (multiline) and u (Unicode) flags, so ^ and $ match at the start and end of every line.
Tips
- Start without regex. Plain text matching is predictable and special characters like
.and(are matched literally. - Test complex patterns first in the Regex Tester, which highlights every match.
- Use whole words for names and short terms to avoid partial matches.
Related tools
Remove whole lines with Remove Lines Containing, or change capitalization with the Case Converter.
How to use the Find and Replace
- Type or paste your text into the input box.
- Choose the options you want.
- The result updates instantly as you type.
- Copy the output or download it as a .txt file.