Search and replace text, with regex and a live match count.
▸ More about
Uses of find and replace
- Renaming a term consistently across a document
- Fixing a repeated typo in one pass
- Swapping placeholders for real values
- Standardizing inconsistent spelling or formatting
find and replace pitfalls
- Replacing a short string that also appears inside larger words
- Forgetting that case sensitivity can skip valid matches
find and replace questions (9)
How do I find text in a document and replace it?
Paste your document, type the text to find, type the replacement, and run replace. Every match updates at once and the match count updates live. Then copy or download the result.
Can I find and replace with regex?
Yes. Enable the .* (regex) toggle so the Find field accepts a regular expression. For example, \d+ matches any number, \s+ matches one or more whitespace characters, and ^Line matches "Line" only at the start of a line. When the toggle is off, special characters like . and * are matched literally.
Does replace change matches inside other words?
Yes. Replace all substitutes every occurrence of the find string, including where it appears inside longer words. For example, replacing "cat" with "dog" also turns "category" into "dogegory" and "concatenate" into "condogenate". Enable the \b whole word toggle to match "cat" only when it stands alone, or add surrounding spaces to the find term.
Is my text uploaded?
No. All processing happens entirely in your browser. Your text is never sent anywhere. This tool runs offline once loaded, so it works without an internet connection.
What is the Aa (case sensitive) toggle?
When Aa is enabled, the search matches the exact capitalisation you typed: "Hello" will not match "hello". When disabled (the default), the search is case-insensitive and "Hello", "hello", and "HELLO" all match.
What is the \b (whole word) toggle?
When \b is enabled, the tool only matches the search term when it appears as a whole word, not as part of a longer word. For example, searching for "cat" with whole word enabled matches "cat" and "cat," but not "category" or "concatenate".
Can I use capture groups in the replacement?
Yes, when the regex toggle is enabled. Use $1, $2, and so on in the replacement field to refer to capture groups in the pattern. For example, a pattern of (\w+)\s(\w+) with replacement $2 $1 will swap two words.
What happens if my regex is invalid?
An error message appears below the Find field explaining what is wrong with the pattern. The source text is displayed unchanged in the result area until you correct the regex.
Is find and replace better than manual editing?
For three or more identical changes, find and replace beats manual editing because it applies one rule to every match and skips nothing. For example, renaming a product across a 5,000 word document takes one pass here versus dozens of error-prone hand edits. Manual editing wins when each occurrence needs individual judgment, like rewording only some sentences.