Find & Replace
Search a block of text and replace every match. Use plain text, whole words or JavaScript regular expressions with capture groups such as $1 and $<name>.
Result
Enter text to find.
How to find and replace text
- Paste your text into the input.
- Enter what to find and what to replace it with.
- Turn on case-sensitive, whole-word or regex matching as needed.
- Check the replacement count and copy the result.
Frequently asked questions
Which regex syntax is used?
JavaScript (ECMAScript) regular expressions, the same as in browsers and Node.js. In the replacement, $1, $2 and $<name> insert capture groups, $& inserts the whole match and $$ inserts a literal dollar sign.
Can a regex freeze the page?
No. Regex replacements run in a background worker with a time limit. If a pattern takes too long, usually because of catastrophic backtracking, it is stopped and you see a warning.
Related tools
- Regex TesterTest JavaScript regular expressions with live highlighting.
- Text Diff CheckerCompare two texts side by side or inline.
- Case ConverterConvert to camelCase, snake_case, Title Case and more.
More in Text Tools.