Find & Replace
Find and replace text in bulk, with regular expressions and live highlights.
How to use the Find & Replace
- 1Paste your text.
- 2Enter what to find and what to replace it with, as plain text or a regular expression.
- 3Check the highlighted matches and apply.
About Find & Replace
Find & Replace searches a text for words, phrases or patterns and replaces every match in one go, with all matches highlighted in a live preview before you copy the result. You can search for plain text or a regular expression, match case, match whole words only, replace only the first match, and keep the case of the original, so replacing color with colour turns Color into Colour and COLOR into COLOUR.
Several rules can run one after another, each on the output of the previous one, which turns it into a bulk replace tool for cleanup jobs: fix recurring typos, swap product names, normalize quotes or reformat dates in a single pass. Regular expressions use JavaScript syntax with Unicode support, including capture groups ($1, $2), named groups ($<name>) and the multiline and dot-all flags. Invalid patterns are reported right away, you can step through every match, and the last replace can be undone.
Writers, editors, developers and data analysts use it to edit documents, clean up CSV exports, rewrite URLs, or test a regex replace before using it in code. The result can be copied or downloaded as a text file.
Frequently asked questions
How do I use capture groups in a replacement?
Wrap part of the pattern in parentheses and refer to it in the replacement with $1, $2 and so on, or name it with (?<name>…) and use $<name>. For example, (\d{4})-(\d{2})-(\d{2}) replaced with $3.$2.$1 turns 2024-05-31 into 31.05.2024.
What does whole word mean?
The match must not be part of a longer word. Searching for cat with whole word on finds cat but skips category and concat. Letters, digits and the underscore count as word characters.
How do I remove line breaks from text?
Turn on Regex, search for \r?\n, which matches both Windows and Unix line endings, and replace it with a space or a comma.
Which regular expression syntax is supported?
JavaScript regular expressions with the Unicode flag, so \d, \w, \s, lookahead, lookbehind and Unicode properties such as \p{L} for any letter all work. Multiline makes ^ and $ match at every line, and Dot all lets . match line breaks.
Guides
More in Text & Writing
Count words, characters, sentences and reading time as you type.
Convert text to UPPER, lower, Title, Sentence, camelCase, snake_case and more.
Compare two texts and see every added, removed and changed word.