How Find and Replace Works
The tool builds a global search pattern from your Find text — either matched literally or, if you check the regex option, compiled as a regular expression — and scans the whole text for every match. Each match is swapped for your replacement text, and the number of replacements made is reported. Case-sensitivity is off by default, meaning "Text" and "text" are treated as the same until you turn it on.
How to Use This Tool
- Paste the text you want to search into the main box.
- Enter the word or phrase to find, and what to replace it with.
- Optionally enable case-sensitive matching or regular-expression mode.
- Select Replace All to apply the change and see how many replacements were made.
Example
Finding "cat" and replacing with "dog" in "The cat sat near another cat." gives "The dog sat near another dog." — 2 replacements made.
Helpful Tips
- Leave "Replace with" empty to delete every match instead of substituting new text.
- Regex mode supports patterns like \d+ to match numbers or \s+ to match whitespace — use it when a plain word search isn't precise enough.
- If a regex pattern is invalid, the tool tells you instead of breaking, so it's safe to experiment.
Frequently Asked Questions
Is matching case-sensitive by default?
What happens if my regex pattern is invalid?
Can I use capture groups in the replacement?
Does Replace All replace every match or just the first one?
This tool runs entirely in your browser. Your input is not uploaded to any server.