Report

Help us improve this tool

Find and Replace Text

Find and replace text online with powerful regex support, visual diff comparison, real-time match highlighting, and undo/redo history.

O M T

What is Find and Replace Text?

The Find and Replace Text tool lets you search for specific words, phrases, or patterns in any text and replace them with new content. It supports regular expressions (regex), case-sensitive matching, whole-word matching, and includes a visual match counter and an undo history so you can revert changes instantly.

How to use

  1. Paste or type your text into the Input text box.
  2. Enter the word or pattern you want to find in the Find field.
  3. Optionally enter a Replace with value.
  4. Toggle Regex, Case Sensitive, or Whole Word as needed.
  5. Click Replace All to apply changes or Find All to extract matches.
  6. Use Undo to revert the last operation.

Common Regex Patterns

Pattern Matches
\d+ One or more digits
\w+ Word characters (letters, digits, underscore)
\s+ Whitespace characters
[A-Za-z]+ Only letters
^\w+ Word at the start of a line
\w+$ Word at the end of a line
[\w.!#$%&'*+/=?^`{|}~-]+@\w+\.\w+ Simple email addresses
\b\d{3}[-.]?\d{3}[-.]?\d{4}\b US phone numbers (loose)

Related text tools

If you need to adjust line breaks in your text, try the Add Line Breaks or Remove Line Breaks tools. To change letter casing, use the Case Converter. For extracting specific content from text, the Email Extractor can pull out email addresses.

Frequently Asked Questions

What is the difference between Find All and Replace All?

Find All copies every match into the result area (one per line) without modifying your input. Replace All substitutes every match with your replacement string and shows the transformed text in the result area.

How does the Whole Word option work?

When enabled, the pattern is wrapped with \b (word boundary anchors). This means cat will only match standalone cat and not catalog or concatenate.

Can I use capture groups in regex replacement?

Yes. When regex mode is on, you can use $1, $2, etc. in the Replace field to refer to captured groups. For example, find (\w+)@(\w+) and replace with $1 at $2 to obfuscate email addresses.

Is my text sent to a server?

No. Everything runs locally in your browser with JavaScript. Your text never leaves your device.

How many undo steps are available?

The tool keeps a running history of previous result states. Each undo reverts to the state before the last Replace All or Find All operation.

Why am I seeing zero matches?

Check that your Find text appears in the input. If you have Regex, Case Sensitive, or Whole Word enabled, try turning them off one at a time to narrow down the issue. Also verify that your regex pattern is valid—invalid patterns silently produce no matches.