Find and Replace Text

Find and replace text, with optional case-sensitive or regex matching

Input text

Result

Nothing you paste here is ever sent anywhere — matching and replacing happen entirely in your browser.

About this tool

This tool replaces every match of your "Find" text with your "Replace with" text across the whole input. By default it does a literal, case-insensitive search, but you can turn on case sensitivity to distinguish "Cat" from "cat", or enable regex mode to use full JavaScript regular expression syntax — capture groups, character classes, anchors, and quantifiers — for more powerful pattern-based replacements.

What happens if I search for a literal string containing special characters like "." or "$"?

With regex mode off, special regex characters in your "Find" text are automatically escaped, so they're matched literally — searching for "3.14" only matches that exact text, not "3" followed by any character and "14".

Can I use capture groups in the replacement, like $1?

Yes, when regex mode is on. Wrap part of your pattern in parentheses to capture it, then reference it in "Replace with" using $1, $2, and so on, exactly as in standard JavaScript regex replacement.

What happens if my regex pattern is invalid?

An error banner appears explaining the pattern couldn't be compiled, and the output is left unchanged from the original input until you fix the pattern.

Swapping text in bulk

Put your text in the top box, type what to look for and what to put in its place, and the changed version shows up below. Every match is replaced at once, which beats clicking through them one at a time in a word processor.

Two checkboxes change how matching works. Case sensitive makes "Color" and "color" different things. Regular expression turns the search box into a pattern, so you can match phone numbers, dates or anything with a shape rather than a fixed spelling. If you've never used regular expressions, ignore the box and plain text search works fine.

It's a good fit for renaming a product across a long document, fixing a spelling the author used forty times, or converting one separator into another in a pasted list.

A quick example

Before
The colour of the colour wheel
(find: colour, replace: color)
After
The color of the color wheel

Good to know

With regular expressions on, characters like . ( ) and ? have special meanings. If a search that should work finds nothing, switch the option off and try again.