
Test regular expressions live with match highlighting and replace preview.
Bulk replace text with optional regex and case matching.
Your files never leave your device. Everything runs in your browser.
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.
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.
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.
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.
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.
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.
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.