Find and replace

Replace every occurrence of a word or phrase in a text at once. Use whole-word matching to avoid changing parts of other words, or regular expressions for patterns.

This free online find and replace tool works in your browser. Everything runs in your browser. What you type is not sent anywhere. All inputs and calculations run locally on your device without server uploads; details on browser processing and storage are set out in the privacy policy.

Whole words and case

With Whole words only, replacing “cat” changes “cat” and “Cat.” but leaves “category” and “concatenate” alone. With Match case on, “Apple” and “apple” are treated as different words.

Using regular expressions

Turn on Regular expression to find patterns instead of fixed text. In the replacement, $1, $2 and so on insert the captured groups, $& inserts the whole match, and \n inserts a new line.

FindReplaceDoes
\s+ Squeezes runs of spaces and new lines into one space
(\w+)@(\w+)$1 at $2Rewrites name@domain as “name at domain”
^- Puts a dash at the start of every line
(\d{2})/(\d{2})/(\d{4})$3-$2-$1Turns 19/10/2026 into 2026-10-19

Good to know

  • The result updates as you type. Press Use as input to make a second, different replacement on the result.
  • Replacing an empty string is not allowed, so typing nothing in Find changes nothing.
  • To test a pattern in detail, with every match and group listed, use the regex tester.

Worked example: Reformatting dates from MM/DD/YYYY to YYYY-MM-DD with regex capture groups

Suppose you have a log or CSV snippet containing US dates (11/14/2026 and 03/05/2025) that you need to convert to ISO-8601 (2026-11-14 and 2025-03-05) in one pass:

  • Input text: Invoice issued on 11/14/2026; due by 12/14/2026.
  • Find box (with Regular expression ticked): \b(\d{2})/(\d{2})/(\d{4})\b (Group 1 = month, Group 2 = day, Group 3 = 4-digit year).
  • Replace with box: $3-$1-$2 (puts Group 3 year first, then Group 1 month, then Group 2 day).
  • Output text: Invoice issued on 2026-11-14; due by 2026-12-14. (2 replacements made).

Limits and what this tool cannot do

  • Operates on plain text (strips rich-text bold/links): Pasting from Word or Google Docs converts the text to plain UTF-8 characters; font styles, tables, and hyperlinks are not preserved.
  • How to insert a literal dollar sign ($) when Regex mode is on: In regex replacement strings, $1–$9 insert capture groups and $& inserts the whole match. To output a literal $ character in regex mode, write $$ in the Replace box (or untick Regular expression for plain literal replacement).
  • Zero-length matches (^, $, .*): Avoid replacing empty zero-width matches globally unless anchoring to start/end of lines with the multiline flag.

Questions

Can I replace with nothing to delete a word?

Yes. Leave Replace with empty and every match is removed.

How do I replace line breaks?

Turn on Regular expression and find \n. Replace it with a space, a comma, or anything else.

Is there a size limit?

Only your device’s memory. Texts of several megabytes work fine.

Is my text uploaded?

No. Everything runs in your browser. What you type is not sent anywhere.

Why did replacing 'cat' also change 'category' to 'dogegory'?

By default, Find matches substrings anywhere inside a word. Tick **Whole words only** so cat matches only the standalone word cat surrounded by spaces or punctuation, leaving category and scatter untouched.

How do I replace every comma with a newline (line break)?

Tick **Regular expression**, type ,\s* in Find, and type \n in Replace with. Every comma (and any space after it) will be replaced by a line break.

How do I delete a word or pattern completely?

Put the word or regex pattern in the Find box and leave the Replace with box completely empty.

Last reviewed .

Related converters and guides