Find and Replace Text

Replace every literal occurrence of a word or phrase and inspect how many replacements were made.

Text is processed locally in your browser and is not uploaded.

Replacements
2

How to use this tool

  1. Paste the source text and enter a nonempty phrase in Find.
  2. Enter the replacement, or leave it empty to remove matches. Choose whether matching should ignore case.
  3. Run Replace text and review the count and output before copying.

Understanding the output

All non-overlapping literal matches are replaced. Punctuation such as a period, bracket, or asterisk is treated as ordinary text rather than a regular expression. Replacement strings are also literal, so dollar-sign sequences are not interpreted as special replacement instructions.

Replacing a color in a short list

Replacing red with green in red apple, red pear produces green apple, green pear and reports two replacements. An empty replacement would remove both occurrences of red.

Check the scope of a replacement

A literal phrase can appear inside a longer word. Replacing cat also changes the matching letters in catalog because this tool does not enforce word boundaries. If you only intend to replace a standalone word, include surrounding context or review each changed passage afterward. A low replacement count is not proof that every change was appropriate.

Case-insensitive matching is useful when a name appears with inconsistent capitalization, but the replacement uses exactly the spelling you enter. It does not automatically preserve title case at the beginning of a sentence.

Use a reversible editing workflow

Keep the original text until you have checked the result. A broad replacement can alter quotations, identifiers, or examples that were meant to remain unchanged. For a long document, test a representative paragraph containing both intended and unintended matches first. This tool handles plain text only; it does not preserve rich-text formatting or edit the contents of an uploaded document file.

Method and supported input

The search phrase is escaped before constructing a global Unicode regular expression. A replacement callback returns your text literally. An output-size check prevents a small repeated match from expanding into an excessively large result.

  • Matches do not overlap.
  • The whole pasted text is within the intended editing scope.

Limitations

  • There is no regular-expression mode or whole-word option.
  • Complex linguistic case folding can differ from a language-specific editor.

Common questions

Can I remove a phrase entirely?

Yes. Leave Replace with empty and run the replacement.

Does an asterisk act as a wildcard?

No. Find and replacement fields are literal text, including punctuation and dollar signs.

Sources and further reading