Find and Replace

Find and replace text in a document, with optional regex, case sensitivity, and whole-word matching, live as you type.

How it works

Every search, plain or regex, is compiled into a single JavaScript RegExp under the hood. In plain-text mode your search term is escaped first (so ., (, $ and friends match literally), "whole word" wraps the pattern in \b word boundaries, and the case toggle simply adds or removes the i flag. The result re-renders on every keystroke, and the match count comes from running the same pattern with the global flag before replacing. Invalid regex input doesn't wipe your text, it just shows the engine's error and leaves the output untouched.

Here's the feature most find-and-replace pages never mention: because replacement uses JavaScript's native String.replace, backreferences work in regex mode. Use $1, $2 for capture groups and $& for the whole match. So finding (\w+), (\w+) and replacing with $2 $1 flips "Doe, Jane" into "Jane Doe" across an entire file, and $$ gives you a literal dollar sign when you need one.

The whole thing runs in this page's JavaScript on your machine. Open DevTools' Network tab while you work: no request carries your text, which is exactly why it's safe to paste logs, config files, or anything else you'd rather not upload to a random website.

Common questions

Can I use regular expressions?

Yes, check "Use regex" and the Find field is treated as a regular expression pattern instead of literal text. Capture groups and special characters like \d, \s, and \b all work.

What's the difference between "Replace all" and leaving it unchecked?

With it checked, every match in the text is replaced. Unchecked, only the first match is replaced, useful when you only want to fix one occurrence.

Is my text uploaded anywhere?

No. Everything runs in your browser using JavaScript's built-in string and regex methods. Nothing you type is sent anywhere.