The Paper Room

Find and Replace

Paste your text, enter a search string and a replacement string, and get the result instantly. Toggles let you control case sensitivity, switch between plain-text and regex mode, and choose between replacing the first match only or all matches.

Regex mode supports the full JavaScript regular expression syntax — capture groups, lookaheads, character classes, and quantifiers all work. In the replacement string, use $1, $2, etc. to reference capture groups. The tool shows how many replacements were made so you can verify the result.

Everything runs in your browser — your text is never sent anywhere.

By The Paper Room Editorial TeamText Tools

Frequently asked questions

How do I use regex capture groups in the replacement?

Enable regex mode, then use parentheses in the search pattern to create capture groups. In the replacement string, $1 refers to the first group, $2 to the second, and so on. For example, search for '(\w+), (\w+)' and replace with '$2 $1' to swap 'Last, First' to 'First Last'.

What happens if my regex is invalid?

The tool catches regex syntax errors and shows an error message instead of crashing. Fix the regex pattern and the output updates automatically.

Can I replace with nothing (delete matches)?

Yes — leave the replacement field empty to delete all occurrences of the search pattern. This effectively strips the matched text from the input.