Text Replacer
Find and replace text or regex patterns across a block of text. Case-sensitive, whole-word, replace-all-vs-first and regex modes with capture-group substitution, plus a live match count.
Input
Enables capture groups — reference them in "Replace With" as $1, $2 or $<name>.
Output
Guides
Text Replacer finds and replaces text or regex patterns inside a block of text, right in your browser. Paste your text, type what you want to find and what to replace it with, and the result updates as you type — no upload, no sign-up, no waiting.
It handles the everyday "swap this word/phrase everywhere" job — cleaning up a document, renaming a variable across a pasted code snippet, fixing a repeated typo, or reformatting data with a regex capture group — without opening a full text editor.
How to use it
- Paste your text into Source Text.
- Type the text (or regex pattern) to search for in Find.
- Type what it should become in Replace With.
- Adjust the options as needed, and read the result off Replaced Text and the Result Summary line above it.
Options
- Treat "Find" as a regular expression — switches Find from a literal string to a JavaScript regex. Reference capture groups in Replace With as
$1,$2, or$<name>for named groups (e.g. find(\w+)@(\w+\.\w+), replace with$1 at $2to de-linkify an email address). - Case sensitive — on by default. Turn it off to match
Cat,catandCATalike. - Whole word only — skips partial matches inside longer words, so replacing "cat" won't touch "category" or "scattered".
- Replace all occurrences — on by default. Turn it off to replace only the first match, leaving the rest of the text untouched.
The Result Summary line always shows how many replacements were made (or how many matches were found when only the first was replaced), so you can tell at a glance whether your pattern matched anything before scanning the whole output.
Is my text private?
Yes. Everything runs client-side in your browser — nothing is uploaded, logged, or stored on our servers. You can disconnect from the internet and it still works.
What regex flavor does it use?
Standard JavaScript RegExp syntax. Patterns are checked before running, and a pattern with a risky nested-quantifier shape (e.g. (a+)+) — a classic cause of a hung browser tab — is rejected with an explanation instead of being run.
Can I replace only the first match instead of every occurrence?
Yes — uncheck Replace all occurrences. The summary will tell you the total number of matches found alongside the one that was actually replaced.