Find and Replace Text Online

Enter text to find.

Your text stays in your browser. Nothing is uploaded.

What Is a Find and Replace Text Tool?

A find and replace text tool searches your text for a word, phrase or pattern and swaps every match for something else. It saves you from scrolling through long documents, fixing the same typo by hand and missing a few. Paste your text, enter what to find and what to replace it with, and the result updates instantly.

It works for articles, code snippets, spreadsheets copied as text, lists, email drafts, subtitles and any other plain text.

How to Find and Replace Text

  1. Paste your text into the top box.
  2. Type the word or phrase you want to find.
  3. Type the replacement. Leave this empty to delete every match.
  4. Choose your options, then read the match count under the fields.
  5. Copy the result. Your original text is never changed, so you can adjust the fields and try again.

To make several different replacements, select “Use result as new text” after each one. This moves the result into the top box so the next replacement builds on it.

What the Options Do

Match case

When this is off, “Apple”, “apple” and “APPLE” all match. When it is on, only the exact capitalisation matches. The replacement is inserted exactly as you typed it, so it does not copy the capitalisation of the text it replaces.

Whole word only

This stops partial matches. Replacing “cat” with “dog” changes “cat” but leaves “category” and “concatenate” alone. A word here means a run of letters, digits and underscores, and letters from other alphabets are supported. This option does not apply in regular expression mode, because you control the boundaries yourself (for example, with \b).

Replace first match only

This changes only the first match and leaves the rest as they are. The status line still shows how many matches the text contains.

Use regular expression

A regular expression (regex) describes a pattern instead of a fixed word, so you can match things like all digits, all dates or any run of extra spaces. The tool uses JavaScript regex syntax. With this option on, ^ and $ match the start and end of each line, \n and \t in the replacement become a new line and a tab, and $1, $2 and so on insert the text captured by the first, second and later groups in parentheses. Use $$ for a literal dollar sign.

With regular expressions off, every character is treated literally, so symbols such as ., *, ?, $ and ( need no escaping.

Regular Expression Examples

GoalFindReplace withExample
Collapse extra spaces and line breaks\s{2,}one space“a b” becomes “a b”
Delete all numbers\d+(empty)“Room 12” becomes “Room ”
Swap first and last name(\w+) (\w+)$2, $1“John Smith” becomes “Smith, John”
Change date order(\d{2})/(\d{2})/(\d{4})$3-$2-$1“31/12/2026” becomes “2026-12-31”
Strip simple HTML tags<[^>]+>(empty)“<b>Hi</b>” becomes “Hi”
Turn line breaks into commas\n, A list becomes one line

The HTML example works for simple tags only. Complex or broken markup needs a proper HTML parser.

Common Uses

  • Writers and editors: fix a repeated misspelling, change a character’s name, or switch between spellings such as “color” and “colour”.
  • Bloggers and site owners: update an old brand name, price or link in text before you paste it into WordPress.
  • Students: clean up notes and remove unwanted symbols.
  • Developers and analysts: rename variables in a snippet, reformat dates, or tidy lists exported from spreadsheets.
  • Anyone cleaning text: remove double spaces, strip numbers, or reshape a list.

Tips for Safe Replacements

  • Check the match count first. A number far higher than you expected usually means the search text is too short or needs “Whole word only”.
  • Skim the result before you copy it, especially after a regular expression.
  • Keep a copy of your original text for important documents. The tool does not alter the top box, but your own file is the real safeguard.

Frequently Asked Questions

Is this find and replace text tool free?

Yes. You can use it as often as you like.

Is my text saved or sent anywhere?

No. Everything runs in your browser, and nothing you type is uploaded or stored.

Why does it say “Invalid pattern”?

The regular expression has a syntax error, such as an unclosed bracket or parenthesis. Fix the pattern, or turn off “Use regular expression” to search for the characters literally.

Can I replace text across several different words at once?

Yes, with a regular expression. For example, cat|dog matches either word. To give each word its own replacement, run the replacements one after another with “Use result as new text”.

Does it handle very long text?

It handles long articles easily because your browser does the work. Extremely large inputs and very complex patterns may be slower, depending on your device.

Can I find and replace a line break?

Yes. Turn on regular expressions and use \n as the search text.

Find and Replace Text Online

Enter text to find.

Your text stays in your browser. Nothing is uploaded.

What Is a Find and Replace Text Tool?

A find and replace text tool searches your text for a word, phrase or pattern and swaps every match for something else. It saves you from scrolling through long documents, fixing the same typo by hand and missing a few. Paste your text, enter what to find and what to replace it with, and the result updates instantly.

It works for articles, code snippets, spreadsheets copied as text, lists, email drafts, subtitles and any other plain text.

How to Find and Replace Text

  1. Paste your text into the top box.
  2. Type the word or phrase you want to find.
  3. Type the replacement. Leave this empty to delete every match.
  4. Choose your options, then read the match count under the fields.
  5. Copy the result. Your original text is never changed, so you can adjust the fields and try again.

To make several different replacements, select “Use result as new text” after each one. This moves the result into the top box so the next replacement builds on it.

What the Options Do

Match case

When this is off, “Apple”, “apple” and “APPLE” all match. When it is on, only the exact capitalisation matches. The replacement is inserted exactly as you typed it, so it does not copy the capitalisation of the text it replaces.

Whole word only

This stops partial matches. Replacing “cat” with “dog” changes “cat” but leaves “category” and “concatenate” alone. A word here means a run of letters, digits and underscores, and letters from other alphabets are supported. This option does not apply in regular expression mode, because you control the boundaries yourself (for example, with \b).

Replace first match only

This changes only the first match and leaves the rest as they are. The status line still shows how many matches the text contains.

Use regular expression

A regular expression (regex) describes a pattern instead of a fixed word, so you can match things like all digits, all dates or any run of extra spaces. The tool uses JavaScript regex syntax. With this option on, ^ and $ match the start and end of each line, \n and \t in the replacement become a new line and a tab, and $1, $2 and so on insert the text captured by the first, second and later groups in parentheses. Use $$ for a literal dollar sign.

With regular expressions off, every character is treated literally, so symbols such as ., *, ?, $ and ( need no escaping.

Regular Expression Examples

GoalFindReplace withExample
Collapse extra spaces and line breaks\s{2,}one space“a b” becomes “a b”
Delete all numbers\d+(empty)“Room 12” becomes “Room ”
Swap first and last name(\w+) (\w+)$2, $1“John Smith” becomes “Smith, John”
Change date order(\d{2})/(\d{2})/(\d{4})$3-$2-$1“31/12/2026” becomes “2026-12-31”
Strip simple HTML tags<[^>]+>(empty)“<b>Hi</b>” becomes “Hi”
Turn line breaks into commas\n, A list becomes one line

The HTML example works for simple tags only. Complex or broken markup needs a proper HTML parser.

Common Uses

  • Writers and editors: fix a repeated misspelling, change a character’s name, or switch between spellings such as “color” and “colour”.
  • Bloggers and site owners: update an old brand name, price or link in text before you paste it into WordPress.
  • Students: clean up notes and remove unwanted symbols.
  • Developers and analysts: rename variables in a snippet, reformat dates, or tidy lists exported from spreadsheets.
  • Anyone cleaning text: remove double spaces, strip numbers, or reshape a list.

Tips for Safe Replacements

  • Check the match count first. A number far higher than you expected usually means the search text is too short or needs “Whole word only”.
  • Skim the result before you copy it, especially after a regular expression.
  • Keep a copy of your original text for important documents. The tool does not alter the top box, but your own file is the real safeguard.

Frequently Asked Questions

Is this find and replace text tool free?

Yes. You can use it as often as you like.

Is my text saved or sent anywhere?

No. Everything runs in your browser, and nothing you type is uploaded or stored.

Why does it say “Invalid pattern”?

The regular expression has a syntax error, such as an unclosed bracket or parenthesis. Fix the pattern, or turn off “Use regular expression” to search for the characters literally.

Can I replace text across several different words at once?

Yes, with a regular expression. For example, cat|dog matches either word. To give each word its own replacement, run the replacements one after another with “Use result as new text”.

Does it handle very long text?

It handles long articles easily because your browser does the work. Extremely large inputs and very complex patterns may be slower, depending on your device.

Can I find and replace a line break?

Yes. Turn on regular expressions and use \n as the search text.