Find and Replace

Find text and replace it with plain or regex-powered substitution.

Text

Output

About the Find and Replace

Find and Replace rewrites every occurrence of one string inside your text. Paste the source text, type what to look for, type what to put in its place, and the output box shows the result. Leaving the replacement empty deletes the matches instead of substituting them.

The tool supports two modes. In plain mode the search string is matched literally, which is what you want for ordinary words and punctuation. In regex mode the search is treated as a JavaScript regular expression, so patterns like \d+ for any number, or \s+ for runs of whitespace, become usable, and capture groups can be referenced in the replacement as $1, $2 and so on.

Regex is powerful and easy to misuse. A pattern that matches an empty string, such as .* or a bare ?, will behave unexpectedly, and special characters like . * + ? ( ) [ ] need escaping with a backslash if you mean them literally. Try the pattern on a short sample first when the text matters.

Common questions about Find and Replace

Does it replace every occurrence?

Yes, a global replace is applied to the whole text rather than just the first match.

How do I use regular expressions?

Tick the regex option and write the pattern in the Find box. For example \d+ finds runs of digits and \s+ finds runs of spaces.

Can I use capture groups?

Yes. Groups written as ( ) in the pattern are available in the replacement as $1, $2 and so on.

Is the search case sensitive?

Plain mode matches exactly what you type, including case. For case-insensitive matching use regex mode and write the pattern with the i flag if the option is available.

How do I delete instead of replace?

Leave the Replace box empty. Every match is removed.

Does it handle multiple lines?

Yes, the whole text is treated as one string, so patterns can cross line breaks when you use \n or the s flag in regex mode.

Related Tools in Text Tools

Word CounterCharacter CounterCase Converter