Skip to main content
Premier SEO Services

Text tools

Find and Replace Text

Find words or phrases in any text and replace them, with several rules applied in one pass, match-case and whole-word options, and regular expressions when you need patterns.

  • Runs in your browser
  • Free, no sign-up
  • Unlimited use
  • Updated 30 September 2026

Find and Replace Text

Paste your text — the result updates as you type

How to use the find and replace text

  1. 1Paste your text into Text to search.
  2. 2Type the text to look for into Find and its replacement into Replace with. Press Add rule for more replacements.
  3. 3Tick Match case, Whole words only, Regular expressions or Replace the whole line as needed.
  4. 4Check the number of replacements under the result, then press Copy or Download.

Example

Input
The colour of the logo and the Colour of the buttons should match.
Watercolours are a separate topic.
Output
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.

FindReplace withEffect
\s+$(empty)Removes spaces at line ends
(\d{4})-(\d\d)-(\d\d)$3/$2/$12026-09-30 becomes 30/09/2026
\n{2,}\nRemoves 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.

Questions about the find and replace text

How do I replace several words at once?

Press Add rule and enter one find/replace pair per rule. All rules run in one pass, top to bottom, and the footer shows the count for each rule.

How do I replace a line break?

Type \n in Find with Read \n and \t as line break and tab ticked (the default). For example, replace \n with , to turn a list into one comma-separated line.

How do I replace a whole line that contains a word?

Type the word into Find, tick Replace the whole line, and type the new line into Replace with. Every line containing the word is replaced.

Is my text sent anywhere?

No. Replacing happens in your browser. Your rules and options are saved in this browser's local storage; the text is kept only in this tab's session storage so a reload doesn't lose it.

Last updated 30 September 2026Maintained by Premier SEO Services

Report a problem