Find and Replace
Search text with regex, case-sensitive, and whole-word options. Highlight matches and replace with capture groups.
Paste your text, type what to search for and what to replace it with, then hit Replace All. Supports regex with capture groups, case-sensitive matching, and whole-word mode so you don't accidentally mangle words you didn't mean to touch. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool scans your input for every occurrence of your search term and swaps it with your replacement string. When regex mode is on, it compiles your pattern as a JavaScript regular expression, so you can use capture groups like $1 and $2 in the replacement. Matches highlight in yellow so you can preview before committing.
Examples
Swapping a Domain Name Across HTML
You migrated to a new domain and need to update every link in your HTML file.
Find: oldsite.com
Replace: newsite.io
<a href="https://oldsite.com/about">
<img src="https://oldsite.com/logo.png">
<link href="https://oldsite.com/style.css">
<a href="https://newsite.io/about">
<img src="https://newsite.io/logo.png">
<link href="https://newsite.io/style.css">
Reformatting Dates with Regex Capture Groups
A CSV export has dates in YYYY-MM-DD but your report template needs DD/MM/YYYY. Regex mode handles this in one pass.
Regex Find: (\d{4})-(\d{2})-(\d{2})
Replace: $3/$2/$1
2024-01-15, John, Sales
2024-03-22, Maria, Engineering
2024-11-08, Alex, Marketing
15/01/2024, John, Sales
22/03/2024, Maria, Engineering
08/11/2024, Alex, Marketing
Whole-Word Replace to Avoid Partial Matches
You need to rename a variable called "id" to "userId" in code, but you don't want to wreck words like "hidden" or "width".
Find (whole word): id
Replace: userId
const id = getData();
const hidden = true;
document.getElementById(id);
const userId = getData();
const hidden = true;
document.getElementById(userId);
Who Uses This
Renaming variables, updating API endpoints, or fixing typos across entire codebases.
Changing a character name in a manuscript draft or fixing a repeated spelling error in 40 pages of copy.
Reformatting dates, cleaning up messy CSV delimiters, or standardizing category labels before import.
Cleaning up notes, fixing formatting from copy-pasted lecture slides, or prepping text for assignments.
Common Mistakes
Searching for "he" and replacing with "she" turns "the" into "tshe" and "her" into "sher". Turn on whole-word matching first, or use regex with \b word boundaries.
You search for "Name" and replace with "Username" — but it also catches "name" and "NAME", giving you "Username" everywhere regardless of the original casing. Enable case-sensitive mode when the capitalization matters.
Special characters like ., (, +, and $ have meaning in regex. If you want to find the literal text "price (USD)", you need to escape the parentheses: price \(USD\). Otherwise the regex engine treats them as group markers and either errors out or matches the wrong thing.
Technical Details
- Processing: 100% client-side — text never leaves your browser
- Regex Engine: JavaScript native RegExp (ES2020+)
- Text Limit: No hard limit, but performance depends on browser memory
- Browser Support: Chrome, Firefox, Safari, Edge
Frequently Asked Questions
How do I find and replace text online for free?
Paste your text into the input box above, type the word or phrase you want to find, type the replacement, and click Replace All. It's free, no signup needed. Works right in your browser.
Can I use regex in find and replace?
Yes. Toggle the regex option on, then write any valid JavaScript regular expression in the Find field. You can use capture groups with parentheses and reference them in the Replace field as $1, $2, etc. So finding (\w+)@(\w+) and replacing with $2/$1 flips the parts around the @ sign.
What does whole word matching do?
It restricts matches to complete words only. Searching for "log" won't touch "blog" or "logging" — just the standalone word "log". Under the hood, the tool wraps your search term with \b word boundary anchors.
Is my text stored or sent to a server?
No. All processing happens locally in your browser using JavaScript. Nothing is uploaded, nothing is stored. Once you close or refresh the page, the text is gone.
How do I replace only the first occurrence?
Click Find to locate matches, then use the Replace button (not Replace All) to swap just the currently highlighted match. You can step through matches one by one with the Previous and Next arrows and decide which ones to replace.