Find and Replace Text
Replace words, phrases, or regex patterns in any text, with live preview and highlighted matches.
Empty rule is skipped
Result — 0 replacements
Rules run top to bottom, each on the output of the previous one. Nothing leaves your browser.
How it works
- Paste or type your text into the input box.
- Enter what to find and what to replace it with — add more rules if you need several replacements applied in order.
- Check the highlighted preview and match count, then copy the result with one click.
Frequently asked questions
- Does this tool support regular expressions and capture groups?
- Yes. Turn on Regex mode and your find field is treated as a JavaScript regular expression. Capture groups work in the replacement field with $1, $2, named groups with $<name>, and $& for the whole match. Invalid patterns show a live error message instead of silently failing.
- Can I run several find-and-replace operations at once?
- Yes. Add as many rule rows as you need and they are applied top to bottom, each one working on the output of the previous rule. This lets you chain cleanups — for example normalize whitespace first, then rename a term — without copying text between runs.
- Is my text uploaded to a server?
- No. Every replacement is computed locally in your browser with JavaScript, and nothing is sent over the network. That makes it safe for logs, code, or documents containing private data, and it also means results update instantly as you type.
- What does the whole word option actually match?
- Whole word only replaces occurrences that are not attached to other letters, digits, or underscores. Searching for cat will match cat in the cat sat but not the cat inside category or concatenate. It works in both plain and regex mode.
- Do I need to escape special characters like dots or brackets?
- Only in regex mode. In the default plain mode, characters such as . * ( ) [ ] are treated literally, so you can search for text like price ($) without escaping anything. Switch to regex mode when you deliberately want pattern behavior.
About this tool
This find and replace tool works like the search-and-replace feature in a text editor, but in your browser and with more power. Paste any text, define one or more find/replace rules, and the output updates live with every keystroke. Replaced sections are highlighted in the preview so you can verify exactly what changed before copying the result, and a running match count tells you how many substitutions were made.
Everything runs client-side in JavaScript — your text never leaves your device, so it is safe to clean up server logs, CSV exports, code snippets, or documents that contain names, emails, or other private data. In plain mode, special characters are escaped automatically and your search string is matched literally. In regex mode, the find field is compiled as a real JavaScript regular expression: character classes, quantifiers, alternation, and lookarounds all work, and the replacement field supports $1 through $99, $<name> for named groups, and $& for the full match. Syntax errors appear immediately under the offending rule instead of breaking the output.
Multiple rules are applied in order, each operating on the result of the previous one. This is useful for multi-step cleanups: strip trailing whitespace, then collapse double spaces, then swap a product name — all in a single pass. Case sensitivity and whole-word matching apply to every rule, so you can toggle behavior for the whole pipeline at once.
A practical tip: when renaming identifiers in code, enable both case sensitive and whole word to avoid touching partial matches inside longer names. And when a regex replacement looks wrong, check the highlighted preview first — it shows precisely which spans each rule consumed, which makes off-by-one pattern mistakes easy to spot.