Skip to content

Find and Replace Text Online

Paste your text, type what to find and what to put in its place. Plain text or regex.

  • 100% free
  • Runs in your browser
  • Instant results
In regex mode use $1, $2 for captured groups and \n or \t in the replacement for a line break or tab.
Quick answer

Find and replace swaps every occurrence of a word, phrase or pattern in your text for something else. Paste the text, type what to find and what to replace it with, and the tool rewrites the text and reports how many matches it changed. You can match case, match whole words only or use a regular expression.

How to use the Find and Replace

  1. Paste your textAdd the text you want to edit to the large box.
  2. Enter find and replaceType the text to look for and its replacement. Leave the replacement empty to delete every match.
  3. Choose the optionsTick match case, whole words only or regular expression if you need them.
  4. Copy the resultCheck the number of replacements in the note, then press Copy.

How find and replace works here

In plain text mode the tool looks for exactly what you type. Characters that have a special meaning in patterns, such as the full stop, question mark and brackets, are treated as ordinary characters, so searching for "3.5" finds only "3.5" and not "365". Every match in the text is replaced, not just the first.

  • Match case: off by default, so "cat" also finds "Cat" and "CAT". Turn it on when capitals matter.
  • Whole words only: stops "cat" from matching inside "concatenate" or "category". A match must have no letter, digit or underscore directly before or after it.
  • Empty replacement: removes every match, which is a quick way to strip a repeated word or symbol.

The note under the result shows how many replacements were made. If it says no matches were found, check for typing differences such as curly versus straight quotes or double spaces.

Using regular expressions

Tick "Use a regular expression" to search by pattern instead of fixed text. Regex uses JavaScript syntax, and the search is global and multi-line, so ^ and $ match the start and end of each line. A few patterns that solve common jobs:

  • \s+ replaced with a single space collapses runs of spaces, tabs and line breaks.
  • ^\s*\n replaced with nothing deletes blank lines.
  • (\w+)@(\w+)\.com replaced with $1 at $2 rewrites email addresses using captured groups.
  • \d{4}-\d{2}-\d{2} finds dates written as 2026-11-24.

In the replacement box, $1 and $2 insert captured groups, $& inserts the whole match, and \n or \t insert a line break or a tab. If the pattern has a mistake, the tool shows the browser's error message instead of changing your text. To build and test a pattern step by step, use the regex tester. To see exactly what changed afterwards, compare the before and after in the text diff checker.

The replacement happens in your browser. Your text is not sent to a server.

Frequently asked questions

How do I find and replace text online?

Paste your text, type the word or phrase to find and the text to replace it with. Every match is replaced at once and the new text appears below with a count of the replacements.

How do I delete a word everywhere in my text?

Type the word in the Find box and leave the Replace box empty. Each match is removed. Tick "Whole words only" so that longer words containing it are left alone.

Can I replace line breaks or tabs?

Yes, in regex mode. Find \n to match line breaks or \t to match tabs, and use the same codes in the replacement box to insert them.

Why does my regular expression show an error?

The pattern is not valid JavaScript regex, usually because of an unclosed bracket or an unescaped special character. Put a backslash before characters such as ( ) [ ] . * + ? when you mean them literally.

Is the search case sensitive?

Not by default: "apple" matches "Apple" and "APPLE". Tick "Match case" to find only text with the same capital and small letters.

Last updated 24 November 2026 by the TheTechFolk team.