Find and Replace Text Online — With Regex Support
Replace every occurrence at once — plain text, whole words, or regular expressions.
🔒 Runs in your browser — files never uploaded ⚡ No signup 💯 Free
Paste your text, type what to find and what to replace it with, and change every occurrence in one click. A live counter shows how many matches your search hits before you commit, so there are no surprises.
Plain text mode treats every character literally — search for 3.50 and you'll match exactly that. Switch on regular expressions when you need patterns: capture groups, alternations, and $1-style backreferences in the replacement all work.
How to use Find & Replace
- Paste your text into the top box.
- Type the search term — the match counter updates as you type.
- Type the replacement. Leave it empty to simply delete every match.
- Click Replace all and copy or download the result.
Whole words only
Replacing cat with dog also turns category into dogegory — the classic find-and-replace accident. The whole-words option adds word boundaries to the search so only the standalone word matches. For any natural-language text it's the option you want on.
A little regex goes a long way
Regular expressions turn this from a text tool into a small data tool. Three patterns cover most real jobs:
\d+— any run of digits. Replace with nothing to strip numbers out.\s+$— trailing whitespace at the end of lines. The invisible junk that breaks diffs.(\w+)@old-domain\.com→$1@new-domain.com— a capture group carries each username across while the domain changes.
Note the escaped dot in old-domain\.com: in a regex, a bare . matches any character. In plain-text mode you don't need to know any of this — everything is matched literally.
Case sensitivity
Matching is case-insensitive by default, which is usually what you want in prose — it catches the capitalised version at the start of a sentence. Turn on "match case" when the distinction matters: renaming userName in code without touching username, for instance. Note the replacement is always inserted exactly as you typed it; matching case doesn't re-case the replacement.
For comparing rather than changing
If you're trying to see what differs between two versions of a text rather than change one of them, that's the diff checker's job.
Frequently asked questions
How do I delete text instead of replacing it?
Leave the replacement field empty. Every match is replaced with nothing — removed. Combined with regex mode this is a quick way to strip anything patterned: numbers, bracketed notes, trailing whitespace.
What does "whole words only" do?
It requires the match to stand alone rather than sit inside a longer word — so replacing cat won't touch category or scatter. Under the hood it wraps your search in word boundaries (\b). For prose it's almost always the right setting.
What regex flavour is supported?
JavaScript's — the same syntax as modern editors: character classes, quantifiers, alternation, groups, lookaheads. In the replacement, $1, $2… insert capture groups and $& inserts the whole match. Write $$ for a literal dollar sign in regex mode.
Why does it refuse my pattern?
Two possibilities. A syntax error — the message names it, and an unescaped special character like ( or [ is the usual cause. Or the pattern matches empty text (like a*, which matches zero a's): that would insert the replacement between every character, so it's blocked deliberately.
Can I replace line breaks?
Yes, in regex mode: search for \n (or \r?\n to be safe with Windows text) and replace with whatever you need — a space to unwrap lines, a comma to build a list. There's no way to type a line break in the replacement field, so joining lines is the direction that works.
Is my text sent to a server?
No — matching and replacement run entirely in your browser. Paste anything; it never leaves your machine.