Find and Replace Bulk replace, regex, match case & live highlighting
Search for text and replace it in bulk — or one match at a time. Use regular expressions for powerful patterns, toggle match case and whole word, and preview every hit highlighted before you commit. Everything runs privately in your browser.
Find and replace
Enter what to find and what to replace it with. Matches are highlighted live below.
$1, $&, or $<name> when regex is on.Match preview
All matches are highlighted in your input text. The active match is shown in solid orange.
Match analytics
Visual overview of how matches are distributed, how dense they are, and what replacing them would do.
Quick actions
One-click transforms applied to the input text.
Examples
Click any example to load it into the form.
A find and replace tool searches your text for a pattern and swaps it for something else. Use it to rename words across a document, clean up formatting, redact sensitive data, or reformat structured text — all in one pass.
All processing happens inside your browser — your text is never uploaded, stored, or tracked.
How to use find and replace
- Paste or type your text into the input box on the left.
- Enter the text or pattern to find in the search field.
- Enter the replacement text — leave it empty to delete matches.
- Toggle options like Match case, Whole word, or Regular expression.
- Click Replace all to replace every match, or use the arrows to step through matches and replace one at a time.
- Use Copy to copy the result, Download to save it, or Swap to send it back to the input.
Updated October 2026
Search options explained
Each option changes how matches are found. You can combine them freely:
| Option | What it does | Example |
|---|---|---|
| Match case | Only matches text with identical capitalisation | "Cat" won't match "cat" |
| Whole word | Only matches complete words, not substrings | "cat" won't match "cats" or "concat" |
| Regular expression | Treats the find pattern as a regex | \d+ matches any number |
| Preserve original case | Adapts the replacement to match the original capitalisation | "Cat" → "Dog", "cat" → "dog" |
| Trim whitespace | Removes leading and trailing whitespace from the input before searching | " hello " → "hello" |
Using regular expressions
Regular expressions let you match patterns rather than fixed text. Enable Regular expression and use JavaScript regex syntax. Some useful patterns:
| Pattern | Matches |
|---|---|
\d+ | One or more digits |
\w+ | One or more word characters (letters, digits, underscore) |
\s+ | One or more whitespace characters |
[aeiou] | Any single vowel |
^Hello | "Hello" at the start of a line |
world$ | "world" at the end of a line |
(cat|dog) | "cat" or "dog" |
(\w+)@(\w+\.\w+) | An email-like pattern with two capture groups |
In the replacement field you can reference capture groups with $1, $2, and so on. Use $& to insert the entire match, or $<name> for named groups.
Common use cases
- Renaming terms. Replace "widget" with "component" across an entire document.
- Redacting data. Use regex to replace phone numbers, emails, or IDs with placeholders.
- Cleaning formatting. Collapse multiple spaces or blank lines with a regex.
- Reformatting lists. Convert comma-separated values into one-per-line using regex.
- Fixing capitalisation. Replace inconsistent terms with a canonical form.
Frequently asked questions
Is this find and replace tool free?
Yes. The tool is completely free, requires no account, and has no advertisements.
Is my text stored or uploaded?
No. All searching and replacing happens locally in your browser using JavaScript. Nothing is sent to a server.
Does it work offline?
Yes. Once the page loads, every feature works without an internet connection.
What does "Replace selection" do?
It replaces only the currently highlighted match in the input box, leaving all other matches untouched. This is useful when you want to apply a replacement selectively.
Can I delete matches instead of replacing them?
Yes. Leave the replacement field empty and click Replace all — every match is removed from the text.
Why does my regex not work?
Make sure Regular expression is enabled and your pattern uses JavaScript regex syntax. Common issues include unescaped special characters and missing flags — this tool enables the g (global) and m (multiline) flags automatically.
What does "Preserve original case" do?
When enabled, the replacement adapts to the case of the original match. If you replace "cat" with "dog", then "Cat" becomes "Dog" and "CAT" becomes "DOG". This only applies to plain-text replacements.
Can I undo changes?
Yes. Click Swap to send the result back to the input, or paste the original text again. The tool does not overwrite your input automatically.
