Utilities

Find & Replace Text

Find and replace text online with case-sensitive and regex options.

About find and replace

Paste your text, type what to look for in Find and what should replace it in Replace. Replace all changes every match at once. Replace next changes the first match from the top, so each click handles one more. The edited text stays in the box, ready to copy, but there is no undo button, so keep a copy of the original before a big Replace all. Matching ignores capitals unless you tick Case sensitive. With Regex support off, what you type is matched literally, dots and brackets included. With it on, Find takes a JavaScript regular expression: \d+ matches any number, ^ and $ mean the start and end of the whole text, and Replace can reuse captured parts as $1, $2 and so on. It runs in your browser, which makes it safe for text you'd rather not upload, like a customer list or a contract. If a regex pattern isn't valid, nothing gets replaced; the Regex Tester shows the error and every match before you commit to a change.

Frequently asked questions

Does it support regex backreferences?

Yes, with Regex support ticked. Capture part of the match with parentheses in Find and use $1, $2 and so on in Replace. Find (\w+)@(\w+) with Replace $2 at $1 turns name@example into example at name, and $& inserts the whole match.

Why does my regex not match what I expect?

Three usual reasons. The pattern runs without the m flag, so ^ and $ only match at the very start and end of the text, not at each line. Matching ignores case unless Case sensitive is on. And an invalid pattern replaces nothing at all. Try it in the Regex Tester, where you can switch on the m flag and see every match highlighted.

How do I replace something with a dollar sign?

Type two dollar signs. The Replace field follows JavaScript's rules even with Regex support off, so $& and $1 have special meanings and $$ gives a single $. Replacing price with $$5 produces $5.

Can I match whole words only?

There is no whole word checkbox, but a regex does it. Tick Regex support and wrap the word in \b, as in \bcat\b, which matches cat but not category or concat.