Find and Replace Text

Find and replace words or phrases in text. Supports plain text and regular expressions.

About this calculator

Find a word or phrase in text and replace it with something else. Turn on regular expressions for pattern matching, case sensitivity for exact matches, and global mode to replace every occurrence.

Use it to clean exported text, rename terms across a draft, fix repeated typos and tidy data.

How to use it

  1. Paste the text.
  2. Enter what to Find and what to Replace With.
  3. Choose Use Regex, Case sensitive and Global as needed.
  4. Press Find & Replace.

Plain text and regex

In plain mode the tool matches the exact text. In regex mode the pattern follows JavaScript syntax: \d+ matches digits, ^ and $ anchor lines, (…) captures a group you can reuse as $1.

Worked example

Text: cat hat bat. Find: at. Replace: og.

Resultcog hog bog
Regex exampleFind (\d{3})-(\d{4}), replace $2-$1

Tips and common mistakes

  • Test regex on a small sample before running on a big text.
  • Escape special characters like . and ? when you mean them literally.
  • Use the Reset button to start over.
  • Case-insensitive search catches 'Cat' and 'cat'.
  • Keep a copy of the original; replacements cannot be undone.

Frequently asked questions

How do I replace all occurrences?

Keep Global ticked.

What is regex?

A pattern language for matching text.

Can I use capture groups?

Yes, refer to them as $1, $2 and so on.

Is it case-sensitive?

Optional.

Can I undo a replacement?

Press Reset and paste the original again.

Is my text uploaded?

No.

Related tools