Text · Made a little simpler

Find and Replace Text

Find and replace text with one or more ordered rules. Match literal words or JavaScript regex patterns, review the changes, and download a TXT file.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Replacement rules

Rules run from top to bottom. Each enabled rule receives the previous rule’s output.

Rule 1

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Find and Replace Text: how to use it

  1. Paste your text or open a local UTF-8 file. Enter the text to find and its replacement. Leave Replace with empty to remove a match.
  2. Choose whether to match case, require a whole word or replace only the first match. Enable JavaScript regex for captures or line anchors. Add and reorder rules for several edits.
  3. Select Apply rules. Compare the match and replacement counts, then copy the result or select Download TXT.

Limits and notes

Up to 20 rules and 1 million UTF-16 code units for input or output. Regex uses JavaScript Unicode and multiline matching, without slash delimiters. Whole-word edges treat Unicode letters, marks, numbers and the underscore as word characters. Jobs run in a cancellable local worker with a three-second limit.

How your privacy works →

Find and Replace Text: common questions

Can I keep a capture from the matched text?

In JavaScript regex mode, put the text to keep in parentheses and use $1 in Replace with for the first capture. Literal mode inserts $1 as typed.

Can I replace the first occurrence but count them all?

Clear Replace all matches on a rule. It still counts every match in that rule’s input and changes only the first one.

Why does moving a rule change the result?

The next rule looks at the previous rule’s edited text. Use Move up or Move down to change that order, or disable a rule temporarily to check its effect.

Guides