Skip to content
M2TOOLKIT

Text · free tool

Find and Replace Text

Replace every occurrence of a word or pattern at once, and see the matches highlighted first.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Text
  • Free
  • No sign-up
  • Runs in your browser
  • Updated

Matches

Type something to find.

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the Find and Replace

  1. Paste your text.
  2. Type what to find and what to replace it with.
  3. Choose match case, whole words or regular expressions if needed.
  4. Check the highlighted matches, then copy the result.

What does this tool do?

Whole-word matching stops “cat” from changing “category”. Regular expressions let you find patterns — like every phone number or date — and rearrange them with $1, $2 in the replacement.

Regular expressions run in an isolated background worker with a time limit, so a tricky pattern can't freeze the page.

Match case, whole words and regular expressions

Match case makes Apple and apple different. Whole words only stops “cat” from changing “category” or “concatenate”. Leave Replace with empty to delete every match. The matches panel highlights what will change (up to the first 300 matches, with a count) before you copy the result or download it as replaced.txt.

Turn on regular expressions to find patterns instead of fixed text. In the replacement, $1 and $2 insert captured groups, and $& inserts the whole match. Patterns run in a separate background worker with a time limit, so a pattern that would take forever stops with a message instead of freezing the page.

Useful patterns to copy

Collapse double spaces: find “ {2,}” (a space followed by {2,}) and replace with a single space. Swap “Last, First” to “First Last”: find (\w+), (\w+) and replace with $2 $1. Wrap every number in brackets: find \d+ and replace with [$&]. Change dates from 2026-10-04 to 04/10/2026: find (\d{4})-(\d{2})-(\d{2}) and replace with $3/$2/$1.

Related: Regex Tester

Why use it?

  • Bulk-edit names, terms and links.
  • Preview matches before replacing.
  • Powerful regex support when you need it.

Use cases

  • Renaming a product, person or term across a long document.
  • Cleaning text pasted from PDFs and emails.
  • Reformatting dates, codes and lists with patterns.

Regex example

Find (\d{4})-(\d{2})-(\d{2}) and replace with $3/$2/$1 to turn 2026-10-04 into 04/10/2026.

Common mistakes

  • Replacing short words without “Whole words only”, which changes them inside longer words.
  • Forgetting to escape special characters like . ( ) ? in regex mode: a dot matches any character.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Frequently asked questions

How do I stop “cat” from changing “category”?

Turn on “Whole words only”. The tool then matches “cat” only when it stands as a separate word.

Is find and replace case-sensitive?

Not by default — “Apple” and “apple” both match. Turn on “Match case” when you only want exact capitalisation to match.

Content last updated . See how M2Toolkit works.

Helpful guides

Other tools people use alongside the find and replace.