Find and replace
Bulk find-and-replace with live preview, regex support, case sensitivity, and whole-word matching. Counts matches as you type. All in your browser.
0 matches
Leave blank to delete matches.
About the Find and replace
Find and replace swaps every occurrence of a search term for a replacement across a whole block of text, with a live match count and an instant preview as you type. You can match plain text or full regular expressions, toggle case sensitivity, and restrict matches to whole words so partial hits inside longer words are left alone.
It is the fast way to rename a term throughout a document, strip out unwanted strings, reformat data with capture groups, or fix a repeated typo, all without loading a heavyweight editor. Because it shows how many matches it found before you commit, you can tune the pattern until the count looks right, then apply the change to the working text or copy the preview.
How to use it
- Paste your text into the Original box; the match count starts updating as soon as you add a search term.
- Type what to find in the Find field and the replacement in the Replace with field; leave the replacement blank to delete matches.
- Toggle Regex for pattern matching, Case-sensitive to respect capitalisation, or Whole word to avoid partial matches inside longer words.
- Watch the live match count and the Preview pane to confirm the change does what you expect.
- Click Apply replace to rewrite the text in place, or Copy preview to copy the result without changing the input.
Examples
Renaming a product throughout a doc
Set Find to "Acme" and Replace with "Globex", leave the options default, and every mention updates in the preview with a count like "7 matches". Click Apply replace and the original text is rewritten so you can keep editing from there.
Reformatting dates with capture groups
Turn on Regex, set Find to "(\d{4})-(\d{2})-(\d{2})" and Replace with "$3/$2/$1". An input of "2026-06-02" becomes "02/06/2026". The $1, $2 and $3 placeholders pull in the year, month and day that the groups captured.
Deleting a tracking parameter
With Regex on, set Find to "\?utm_[^\s]+" and leave Replace empty. Every "?utm_source=..." tail on your pasted URLs is matched and removed, leaving clean links. The blank replacement field is what turns find-and-replace into a delete.
Frequently asked questions
- How do I reference part of a match in the replacement?
- Switch on Regex, wrap the parts you want in parentheses to create capture groups, then use $1, $2 and so on in the replacement. $1 is the first group, $2 the second. This lets you rearrange or reformat matched text rather than replacing it wholesale.
- What does Whole word actually do?
- It wraps your search term in word boundaries so it only matches complete words. Searching 'cat' with Whole word on will not touch 'category' or 'scatter'. It is available for plain-text searches; when Regex is on, the option is disabled because you control boundaries yourself.
- Why is my match count zero when the text is clearly there?
- Check Case-sensitive: if it is on, 'Apple' will not match 'apple'. Also, in plain-text mode the search is literal, so special characters are taken as themselves. If you meant a pattern, enable Regex.
- What happens if my regular expression is invalid?
- The tool catches the error, shows an 'Invalid pattern' message under the Find field, leaves your text unchanged and disables Apply. Fix the pattern and the preview and count resume immediately.
- Does Apply differ from Copy preview?
- Yes. Copy preview puts the replaced result on your clipboard but leaves the input untouched. Apply replace writes the result back into the Original box, which is what you want when you plan to run several passes one after another.
Good to know
In plain-text mode your search term is escaped automatically, so characters like a dot, asterisk or question mark are treated literally rather than as regex operators. That makes ordinary swaps safe and predictable. The moment you enable Regex, those characters regain their special meaning, the Whole word helper switches off, and you take responsibility for boundaries and escaping yourself.
A practical workflow is to chain Apply passes: replace one term, apply, then change the search and apply again, building up several edits on the same text. Keep an eye on the match count as a guardrail, because an unexpectedly high number usually means your pattern is too broad and is catching substrings you did not intend. For one-off swaps where you want to keep the source intact, prefer Copy preview so the original stays put for comparison.