Find and replace

Change a name, fix a repeated typo or reformat data in a long text in one step, with a live count of how many places will change.

Private: works in your browser, nothing is uploaded.

How to use the Find and Replace tool

  1. Paste your text into the box.
  2. Type what to find and what to replace it with.
  3. Choose the options: match case, whole words or regular expression.
  4. Click “Replace all”, check the result and copy it. Use “Undo” if needed.

Whole words prevent surprises

Replacing “cat” with “dog” would also turn “category” into “dogegory”. Tick “Whole words only” and only the separate word is replaced. It works for all alphabets, including accented and non-Latin letters.

Regular expressions

Tick “Regular expression” for patterns. Use groups in the replacement with $1, $2 and so on. For example, find (\d{2})/(\d{2})/(\d{4}) and replace with $3-$2-$1 to turn 25/12/2026 into 2026-12-25. Test complex patterns first in the Regex Tester.

Useful replacements

  • Replace double spaces with single spaces.
  • Change a product or company name throughout a document.
  • Turn a comma-separated list into one item per line: with regex on, find ,\s* and replace with \n (a line break; \t inserts a tab).
  • Swap straight quotes for typographic quotes before publishing.

Privacy

Everything runs in your browser. Your text is not sent to our server or stored anywhere.

Regular expressions that are often useful

  • \s{2,} → one space: collapse runs of spaces and tabs.
  • ^\s+|\s+$ → nothing (with multiline text): trim spaces at the start and end of lines.
  • (\w+)@(\w+) → $1 at $2: rewrite email addresses.
  • \n{3,} → \n\n: remove extra empty lines.

Avoiding mistakes

Before you click “Replace all”, look at the match count. If it is higher than you expected, the search is catching more than you meant, for example part of longer words. Use whole words or a more specific search, and keep a copy of the original text until you have checked the result.

Frequently asked questions

Is the replacement case-sensitive?

Not by default. Tick “Match case” to replace only exact matches.

Can I undo a replacement?

Yes, the last “Replace all” can be undone with the Undo button.

Can I replace in a Word file?

Copy the text into this tool and back, or use Word’s own Find and Replace (Ctrl+H), which keeps the formatting.

How do I insert a dollar sign in regex mode?

Write $$ in the replacement. In normal mode, a dollar sign is inserted as it is.

Is my text uploaded?

No. Search and replace run in your browser.

Can I replace several different words at once?

Run one replacement after another. With regular expressions you can also combine alternatives, for example find colour|color and replace both.