How to use the find and replace text
- 1Paste your text into Text to search.
- 2Type the text to look for into Find and its replacement into Replace with. Press Add rule for more replacements.
- 3Tick Match case, Whole words only, Regular expressions or Replace the whole line as needed.
- 4Check the number of replacements under the result, then press Copy or Download.
Example
The colour of the logo and the Colour of the buttons should match. Watercolours are a separate topic.
The color of the logo and the color of the buttons should match. Watercolours are a separate topic.
Default settings: find colour, replace with color, case ignored, Whole words only ticked. “Watercolours” is untouched because it isn't the whole word. The replacement is inserted exactly as typed, so “Colour” becomes lowercase “color”.
Simple find and replace
Every occurrence of Find is replaced as you type, and the footer shows how many replacements were made. Leave Replace with empty to delete the matches.
Case is ignored by default, so colour also finds “Colour” and “COLOUR”. The replacement is always inserted exactly as you typed it; it doesn't copy the capitalization of the text it replaces. Tick Match case when capitals matter.
Several replacements in one pass
Press Add rule to add up to 20 find/replace pairs. Rules run from top to bottom, and each one works on the result of the rules above it, so order matters. To swap two words, use a placeholder: cat → #tmp#, then dog → cat, then #tmp# → dog.
Your rules and options are remembered in this browser for your next visit, which is handy for clean-up jobs you repeat. The text itself is only kept for this tab session.
Match case and whole words
Whole words only matches only when the text isn't directly attached to another letter, digit or underscore, so cat doesn't match inside “category” or “cat_id”, but does match “cat,” or “(cat)”. It works with accented letters too: café won't match inside “cafés”.
Match case makes Apple and apple different. Use both together for exact replacements in code or data.
Using regular expressions
Tick Regular expressions to use JavaScript regex syntax (with Unicode support). ^ and $ match at the start and end of each line, as in most code editors. In Replace with, $1, $2 insert captured groups, $<name> a named group, $& the whole match and $$ a dollar sign.
| Find | Replace with | Effect |
|---|---|---|
\s+$ | (empty) | Removes spaces at line ends |
(\d{4})-(\d\d)-(\d\d) | $3/$2/$1 | 2026-09-30 becomes 30/09/2026 |
\n{2,} | \n | Removes blank lines |
An invalid pattern shows an error naming the rule. To build and debug a pattern step by step, use the regex tester.
Replacing whole lines that contain a word
Tick Replace the whole line and every line that contains a match is replaced entirely by Replace with. For example, find TODO with replacement (removed) turns TODO: fix this into (removed) and leaves other lines alone. With regular expressions on, $1 still refers to the groups in your pattern.
To delete matching lines rather than replace them, use remove lines containing, which also has a keep-only mode.
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
