Find and Replace
Find and replace text with case-sensitivity, whole-word matching, and full regex support. No upload, no account.
Paste a block of text, define a find pattern, and replace every match. Supports literal find, whole-word boundaries, and full JavaScript regex including capture groups. Reports the number of replacements after each run.
Find-and-replace is the workhorse of text cleanup: rewrite a brand name across a document, change every date format, strip HTML tags from a paste, or swap a variable name through a code snippet. Doing it in a text editor is fine for one file, but when the source lives on the web, in an email, or in a chat window, an online tool is faster. This tool runs the replacement locally so you can paste sensitive text without worrying about where it goes.
Three matching modes cover nearly every scenario. Literal mode escapes every regex metacharacter in your find string so you can search for raw text like 'foo.bar' without false matches. Whole-word mode wraps the pattern in \b boundaries so 'cat' doesn't match inside 'category'. Regex mode exposes full JavaScript regex with global and case-insensitive flags toggled by the case-sensitivity checkbox, supporting capture groups, alternations, and character classes. The replacement string is taken verbatim in literal mode, so a '$1' in your replacement only expands to a capture group when regex mode is on.
- 1
Paste your source text
Drop the block of text you want to modify. Works on anything from a short paragraph to a long document.
- 2
Set find and replace terms
Type the search string in Find and the replacement in Replace with. Toggle case-sensitivity, whole-words, or regex to match your needs.
- 3
Replace and copy
Click Replace all to apply. A badge shows how many matches were replaced, and the output is ready to copy.
Rewrite brand or product names
Swap old names out of docs, marketing pages, or email templates before a rebrand goes live.
Strip HTML or markdown
Use regex to remove tags like <[^>]+> from a web paste and keep only the plain text.
Normalize date formats
Convert dates like 2024-03-15 to 15 Mar 2024 with a capture-group regex replacement.
Refactor identifiers
Rename a variable or function across a pasted code snippet using whole-word matching to avoid partial hits.
Does the replace run on my machine?
Yes. The match and replace use the browser's built-in RegExp engine. Nothing is sent to a server.
What happens if my regex is invalid?
The tool surfaces the RegExp compile error so you can fix the pattern. No partial replace runs when the pattern fails to parse.
Can I use capture groups in the replacement?
Yes, when regex mode is on. Refer to capture groups as $1, $2, and so on in the Replace field. In literal mode the $ characters are taken verbatim.
How do I replace a newline or tab?
Turn on regex mode and use \n for newline or \t for tab in the Find field. In the Replace field, newlines and tabs can be typed directly or inserted with paste.
Does whole-word matching work with regex mode on?
Regex mode takes over when enabled; the whole-word checkbox is ignored. Wrap your regex in \b...\b yourself if you want word boundaries in that mode.