Find and Replace
Find & replace text
What Is This Tool?
The Find and Replace tool searches a block of text for a word, phrase, or regular expression and replaces every occurrence with your chosen replacement text. It supports case-sensitive matching, whole-word matching, and full regular expression search for advanced text transformations.
How to Use
Paste your text into the input box.
Enter the text or pattern to find and its replacement.
Choose case sensitivity, whole-word, or regex mode.
Click Replace All to see the updated text and match count.
Features
- Replaces all occurrences in one click
- Optional case-sensitive matching
- Optional whole-word-only matching
- Optional full regular expression support
- Shows the number of replacements made
- 100% client-side — nothing leaves your browser
Examples
Input: The cat sat on the mat. Category theory is fun.
Find: cat Replace with: dog Whole word only: checked
Output: The dog sat on the mat. Category theory is fun.
Common Use Cases
- Renaming a variable or term throughout a document
- Cleaning up placeholder text before publishing
- Bulk-editing configuration files or code snippets
- Using regex to reformat dates, numbers, or structured text
Frequently Asked Questions
What does "Whole word only" do?
It wraps your search term with word boundaries so that "cat" matches "cat" but not "category" or "concatenate". It has no effect when "Use regex" is enabled, since your pattern controls matching directly.
How does regex mode work?
When "Use regex" is checked, the Find field is compiled directly as a JavaScript regular expression with the global flag (and case-insensitive flag unless "Case-sensitive" is checked). Invalid patterns show an error message instead of a result.
Can I use capture groups in the replacement?
Yes, in regex mode you can reference capture groups in the replacement text using $1, $2, and so on, following standard JavaScript replace() syntax.
Is the search case-sensitive by default?
No, by default the search is case-insensitive. Check "Case-sensitive" to match the exact letter case of your search term.
Is my text sent anywhere?
No. All searching and replacing happens entirely in your browser using JavaScript. Nothing is uploaded or stored.