Find & Replace
Bulk replace text with optional regex and case matching.
Your files never leave your device. Everything runs in your browser.
What Find & Replace does
Find & Replace changes every occurrence of a search term in a block of text. Type the term, type the replacement, click Replace all, and the box is updated while a counter reports how many replacements were made. A Regex checkbox switches the search term from literal text to a JavaScript regular expression, and a Case sensitive checkbox controls whether letter case has to match.
It is the tool for bulk edits that would be tedious by hand: renaming a word across a long document, swapping placeholders for real values, reformatting dates or email addresses, or changing every instance in one pass instead of clicking Replace repeatedly. For example, plain mode with find “cat” and replace “dog” turns “The cat sat. Cat!” into “The dog sat. dog!”, and the same search with Case sensitive ticked changes only “cat”.
With Regex enabled, capture groups and special replacement patterns such as $1 and $& become available. Finder “(\w+)@(\w+)” with replacement “$2.$1” turns “[email protected] and [email protected]” into “example.ana.com and test.bo.org” in one click.
How to use Find & Replace
- Paste the text into the box at the bottom.
- Enter the search term under Find and the replacement under Replace with. Leave the replacement empty to delete every match.
- Tick Regex if the search term should be a regular expression; leave it off for literal text, including characters such as $ and . that are special in regex.
- Tick Case sensitive if matching must respect capitalisation. By default “cat” also matches “Cat”.
- Click Replace all — the box is updated and the info line shows how many replacements were made.
- Use Copy to copy the result. Keep the original text elsewhere until you have checked the output, since there is no undo.
Features
- Literal and regex matching, each with replace-all in one pass.
- Case-insensitive by default, with a Case sensitive toggle for exact matching.
- Regex mode uses the browser's JavaScript regular expression engine, including capture groups and $1-style substitution.
- Replacement counter reports exactly how many matches were changed.
- Invalid regular expressions are caught and reported with a toast instead of breaking the page.
- Everything runs in the browser; the text is never uploaded.
Tips and common mistakes
- In plain mode every character is matched literally, so a search for “a.b” finds the three characters a.b. Tick Regex only when you actually want pattern matching.
- Replacement strings follow JavaScript substitution rules: $& inserts the whole match and $1 the first capture group. A literal dollar sign is written as $$, and a pattern such as $1 with no matching group stays as typed.
- Be careful with dollar signs in replacements. Replacing “\$5” (the literal price) with “$&0” on “price is $5” produces “price is $50”, because $& re-inserts the matched text.
- There is no preview of individual matches, so work on a copy: the counter tells you how many matches were found, but not where they were.
- Whole-word matching is not built in. With Regex enabled, wrap the term in word-boundary markers — “\bcat\b” matches “cat” but not “category”.
- An empty Find field is ignored with an “Enter something to find” message, and neither box is modified until you click Replace all.
Frequently asked questions
What is the difference between plain and regex mode?
In plain mode every character is matched literally, so “a.b” finds exactly a.b. With Regex ticked the term is compiled as a JavaScript regular expression, where “.” matches any character. Plain mode is the safe default for ordinary words and phrases.
How do capture groups work?
In regex mode, groups written as parentheses can be reused in the replacement as $1, $2 and so on, and $& inserts the whole match. This is the same substitution syntax as JavaScript's String.replace. If the pattern has no matching group, a reference such as $1 is left as literal text.
Why did nothing change when I clicked Replace all?
The usual causes are Case sensitive being on while the text uses different capitalisation, or regex metacharacters being searched in plain mode. Check the info line: “0 replacement(s) made” means no match was found and the text is unchanged.
What happens with an invalid regular expression?
Regex mode compiles the pattern before replacing anything. A malformed pattern shows an “Invalid regex” toast and the text is left exactly as it was.
Which regex flavour does it use?
JavaScript's own engine — the same one as your browser's developer console. Lookbehind and named groups work if your browser supports them, while syntax from PCRE, Python, Java or .NET can fail.
Can I match whole words only?
There is no whole-word checkbox. With Regex enabled, wrap the term in word-boundary markers, for example “\bcat\b”, which matches “cat” and “cat.” but not “category”.
Related text tools: Regex Tester, Line Tools, Case Converter, Word Counter.
The search and replace run in your browser; the text is never sent to a server.