How to use Find and Replace Text
- Paste your text into the Text field.
- Type the text to find and what to replace it with. An empty Find box is refused.
- Choose whether letter case must match and whether to replace whole words only.
- The replaced text updates as you change the fields. Check the match count against what you expected.
Example: Find and Replace Text
Replace one word and see how the whole-word setting changes a word inside a longer one.
Options
- Letter case
- Match the exact case leaves capitalised matches alone. Ignore case replaces Cat as well as cat, which is the setting that catches unexpected counts.
- Whole words only
- Off replaces the match inside longer words, so catalogue changes. On skips any match that has a letter, a digit or an underscore touching it.
Supported inputs and limits
- Up to 5,000,000 characters and 200,000 replacements in one run.
- Matching is plain text only, with no regular expressions.
- An empty search is refused.
- Word-boundary matching follows Unicode letters, numbers and the underscore, so punctuation and non-Latin word boundaries can behave differently from a word processor.
- A run that reaches the replacement cap stops and marks the result as truncated rather than finishing silently.
More details
Use up to 2,000 characters per find string, 200,000 per main replacement and ten extra rows with 2,000 characters per cell.
Replacements run in order; later rows can match earlier output.
The source highlight shows at most 100 matches in the first 8,000 characters.
Output is capped at 5,000,000 characters.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
Where word boundaries fall
Whole words only treats letters, numbers and the underscore as word characters. A match is skipped when one of those sits immediately before or after it. Punctuation usually marks a boundary, so cat, and (cat) match, while catalogue and cat9 do not. Scripts that do not separate words with spaces can behave differently from how a word processor draws the same boundary, so read the result around one match before you trust a bulk change.
How each replacement pass works
Within one replacement row, the scan moves past each match without searching the text it just inserted. Replacing a with aa therefore produces aa with one match, rather than a loop. Additional replacement rows run afterward in order, and each row can match the output of earlier rows. Check that order before applying several changes to a document.
Questions about Find and Replace Text
Can I use a regular expression here?
No. The search is always literal text, so a dot, a bracket, a backslash or a dollar sign is an ordinary character rather than pattern syntax. A pattern-style search will look for those exact characters.
Why was Cat not replaced while cat was?
Letter case was set to match the exact case, so only cat matched. Switch to Ignore case and Cat is replaced too.
Why did a word inside another word change?
Whole words only was off, so the search also matched inside longer words. In the worked example that turned catalogue into dogalogue. Turn the setting on to leave longer words alone.
What happens after 200,000 replacements?
The run stops at the cap and flags the result as truncated, so a very large document is never rewritten as if it were complete. Split the text into parts and replace in each one to stay under the limit.