Utilia

Find and Replace

Find and replace words or patterns in any text, with case-sensitive, whole-word and regular expression options, a replacement count and a live preview.

Search mode

Preview (removed text struck through, new text highlighted)

How to find and replace text

  1. Paste your text in the Text box.
  2. Type what you are looking for in Find and the new text in Replace with. Leave Replace with empty to delete every match.
  3. Choose Plain text to search for the exact characters you typed, or Regular expression to search with a pattern.
  4. Tick Case sensitive if “Paris” and “paris” must be treated differently, and Whole words only if “cat” must not match inside “concatenate”.
  5. Check the count of replacements and the preview, where removed text is struck through and new text is highlighted.
  6. Copy the Result, or click Use the result as the new text to run another replacement on it.

The result updates as you type. Replace all simply runs the replacement again.

Plain text mode

In plain text mode, every character is taken literally: dots, brackets, asterisks and dollar signs have no special meaning, in the search and in the replacement alike. This is the right mode for everyday edits such as renaming a product in a document, fixing a misspelled name everywhere, or swapping one URL for another.

Whole words only treats letters from every alphabet as parts of words, so searching for “été” as a whole word will not match inside “étés” or “comité”, and a hyphen counts as a word boundary: “chat” matches in “chat-bot”.

Regular expression mode

Regular expressions describe patterns instead of fixed text. The tool uses the JavaScript syntax, with two conveniences for editing documents:

  • ^ and $ match at the start and end of each line, so ^ with the replacement - turns every line into a list item.
  • In the replacement, \n inserts a line break and \t a tab.

The replacement can reuse parts of the match: $1, $2… insert captured groups, $<name> a named group, $& the whole match, and $$ a literal dollar sign. A few useful examples:

Find Replace with Effect
(\d{4})-(\d{2})-(\d{2}) $3/$2/$1 2026-09-30 → 30/09/2026
[ \t]+$ (empty) removes trailing spaces from every line
{2,} collapses runs of spaces
(?<first>\w+) (?<last>\w+) $<last>, $<first> Jean Dupont → Dupont, Jean
\bcolour\b color British to American spelling

Unicode classes such as \p{L} (any letter) work. Older syntax that is only valid without Unicode mode, such as \-, is accepted too.

Safety with slow patterns

Some patterns, such as (a+)+, can take an exponential amount of time on text that almost matches. To keep your browser responsive, regular expressions run in a background worker and are stopped after 1.5 seconds, with a clear message. The tool also warns you when it detects nested quantifiers. An invalid pattern shows the error reported by the browser instead of a result.

Frequently asked questions

Is my text uploaded anywhere?

No. The search and the replacements run entirely in your browser. Nothing is sent to a server or saved.

How do I delete every occurrence of a word?

Type the word in Find, leave Replace with empty and copy the result. Tick Whole words only to avoid deleting it inside longer words.

Why does my dollar sign disappear in regular expression mode?

In regex mode, $ introduces a reference such as $1 or $&. Write $$ to insert a single dollar sign. In plain text mode, the replacement is always literal.

Can I replace line breaks?

Yes, in regular expression mode. Search for \n to find line breaks, and use \n in the replacement to insert them. For example, find \n and replace with , to join a list into one line.

How large can the text be?

Up to 2 million characters. The preview highlights the first 2,000 replacements; the result box always contains the complete text.