Skip to content
ToolsUnlocked

Find and Replace Text

Find and replace every occurrence of a word or phrase in one go. Type what to find and what to replace it with, and the result updates instantly with a count of matches. Options let you ignore case, match whole words only, use regular expressions, or run a whole list of replacements at once.

Runs in your browser Free, no sign-up
Find and Replace Text

How to find and replace text

  1. 1 Paste your text into the Your text box.
  2. 2 Type the word or phrase in Find and the new text in Replace with.
  3. 3 Choose options such as Whole words only or Use regular expression.
  4. 4 Copy or download the updated text.

Using regular expressions safely

Plain mode finds exactly what you type. Regex mode lets one pattern match many variations:

  • \d+ matches any number, such as 7 or 2026.
  • ^ and $ match the start and end of each line, so ^- finds lines starting with a dash.
  • Brackets capture parts you can reuse: find (\w+)@gmail\.com and replace with $1@company.com.

Turn on whole word so replacing cat does not change category. Check the match count before you copy the result. For changing capitals rather than words, the Case Converter is quicker, and the Diff Checker shows exactly what changed.

Features

Live preview

See the result and the number of replacements as you type.

Whole words

Replace cat without changing category.

Regular expressions

Powerful patterns with $1 capture groups.

Bulk replacements

Put several searches on separate lines to replace them all at once.

When to use it

Editing documents

Update a name, price or date throughout a text. Check every change with the Diff Checker.

British and American spelling

Swap colour for color and similar words. Change capitals with the Case Converter.

Data cleanup

Change separators or codes in exported data. Replace line breaks with commas using Remove Line Breaks.

Templates

Fill placeholders such as {name} in a message. Clean the whole text with the Text Cleaner.

Related Text tasks

Frequently asked questions

How do I replace a word but not parts of other words?

Tick Whole words only. Then replacing cat leaves category and concatenate unchanged.

How do I delete a word?

Leave Replace with empty. Every match is removed.

What are regular expressions?

Patterns that match text by rules, such as \d+ for any number. With Use regular expression ticked, you can also use $1 in the replacement to reuse part of the match.

How do several replacements work?

Tick the last option and type one search per line in Find, with the matching replacement on the same line in Replace with.

Is the replacement case-sensitive?

Not if Ignore upper and lower case is ticked. The replacement text is inserted exactly as you typed it.

Can I undo a replacement?

Your original text stays in the input box, so simply change or clear the Find box to see the original again.

Can I replace text in many lines at once?

Yes. Every match in the whole text is replaced in one go, whether it is on one line or a thousand.

How do I replace a line break?

Turn on regular expressions and search for \n. Replace it with a comma or a space to join lines.

Can I make several different replacements at once?

Yes. Turn on the option to treat each line of Find as a separate search, and put the matching replacement on the same line of Replace with.

How this tool works. These text tools run entirely in your browser with plain JavaScript, so the text you paste never leaves your device and results update as you type. Each tool is tested with real text such as copied PDFs, emails, code, lists, emojis and non-English scripts before it goes live.

HF

Built and reviewed by , founder and lead developer
Last updated · How we check our tools · Report a problem