Theme: -
Font size:

Text Replacer - Find and Replace Words or RegEx

Find and replace words, strings, escape sequences, or regular expressions across your text with live match counts.

🔒 Data Safety: We process everything securely and never store or share it.

Enter your text:

How to Use

  1. Enter your text, select "Open File", or drop a local text file into the input box above.
  2. Enter your search and replacement terms, select a search mode, and set the matching options.
  3. View the live match summary, then copy or download your replaced text from the result box.

Options Explained

  • Find: Enter a word, phrase, or escape sequence (\t, \n, \r, \\) for literal text searches. In RegEx mode, enter a raw regular expression or a /pattern/flags expression to match patterns.
  • Replace With: Specify the replacement string, escape sequence (\t, \n, \r, \\), or RegEx capture group ($1, $2). Leave this field empty to delete every matched word or pattern from your text.
  • Search Mode: Choose Text / Word to match literal strings and escape sequences without special regex rules. Select Regular Expression (RegEx) to search and replace text using pattern matching and capture groups.
  • Replace All: Replaces every matching word, phrase, or pattern across your entire text when enabled by default. Uncheck this box to replace only the first match and leave all remaining occurrences unchanged.
  • Case-Insensitive: Matches uppercase and lowercase letters interchangeably during text or regular expression searches when checked. Leave this option unchecked to enforce strict case-sensitive matching for your search term.
  • Whole Words: Restricts matches to standalone words using Unicode word boundaries so partial matches inside longer words stay untouched. This option disables automatically in Regular Expression (RegEx) mode where you control boundaries with \b.

Key Features

  • Find and replace literal words, phrases, raw regular expressions, or /pattern/flags patterns across your text.
  • Support escape sequences (\t, \n, \r, \\) and empty replacement strings to delete matched text.
  • Keep literal dollar signs in Text / Word mode and expand capture groups ($1, $2) in RegEx.
  • Match standalone whole words across multilingual Unicode boundaries while preserving accented characters and emojis.
  • Control search scope with Replace All or first-match replacement and optional case-insensitive matching.
  • Show live replacement counts and output line totals locally inside your web browser memory.

About This Online Text Replacer

The text replacer is a browser-based utility that searches and updates words, phrases, or patterns in text. It supports escape sequences, regular expression capture groups, Unicode whole-word boundaries, and live replacement counts.

Developed and maintained by the PU Tools team, this tool gives you fast, accurate, safe, and easy results in just a few clicks.

Common Use Cases

  • Bulk Term Updating: Replace outdated product names, URLs, or status labels across multiline lists without altering surrounding text.
  • Delimiter Conversion: Swap tabs (\t), line breaks (\n), commas, or pipes to convert lists between different data formats.
  • RegEx Pattern Reformatting: Match emails, dates, or IDs with regular expressions and reformat them using $1 capture groups.

Example Input and Output

Example Input

Order #101: apple - $10
Order #102: APPLE - $10
Order #103: pineapple - $10 🚀

Options used: Find: "apple" | Replace With: "orange" | Search Mode: Text / Word | Replace All: ON | Case-Insensitive: OFF | Whole Words: OFF

Example Output

Order #101: orange - $10
Order #102: APPLE - $10
Order #103: pineorange - $10 🚀

The replacer changes both lowercase "apple" matches to "orange" while keeping "APPLE", "$10", and the emoji.

Text Replacer Example
Screenshot: Actual output of the Text Replacer

Frequently Asked Questions

How do I delete matched words or patterns instead of replacing them?

Leave the Replace With box completely empty after entering your search term in Find. The replacer removes every matched phrase or regular expression pattern without adding extra spaces.

How can I find or replace tab characters and line breaks?

Type \t for tab characters or \n for line breaks in either Find or Replace With. Enter \\ whenever you need to search for or insert a single literal backslash character.

How does the Whole Words option handle international accented letters?

Whole Words uses Unicode word boundaries instead of basic ASCII rules to detect standalone words. This prevents false matches inside accented words like café or non-Latin scripts during replacement.

How do I use regular expressions and capture groups like $1?

Select Regular Expression (RegEx) mode and wrap the pattern parts you want to keep in parentheses. Reference those captured groups in the Replace With box using $1, $2, or $& for full matches.

Do dollar signs in Replace With act as capture groups in Text / Word mode?

No, Text / Word mode treats dollar signs like $10 or $& as literal characters. You can insert prices, currency amounts, and dollar symbols without escaping the dollar sign.

Does this text replacer store or send my words to any server?

No, every search and replacement task runs directly in your browser without server requests. Your input text, search patterns, and updated results stay private on your device.