Find and Replace
Find and replace text with a live highlighted preview before committing, plain text or regex.
About this tool
Paste text and search it with either a plain literal match or a full regular expression, with case-sensitivity and replace-all-versus-replace-first toggles so the search behaves exactly how you need it to. Every match highlights inline in a preview panel before anything is actually replaced, so you can visually confirm the pattern is catching what you expect - and nothing else - before committing to the replacement. Once you click Replace, the result shows the exact count of replacements made and a separate result panel you can copy or feed back into the source for another pass. Plain text mode automatically escapes regex special characters, so searching for something like "a.b" or "$100" behaves as a literal string rather than accidentally being interpreted as a pattern. Runs entirely client-side.
Frequently asked questions
Confirming what actually matches before committing is especially important in regex mode, where a small mistake in the pattern - an unescaped special character, a greedy quantifier - can match far more or less than intended. Seeing every match highlighted in place lets you catch that before any text is altered, rather than discovering the problem after the replacement already happened.
Plain text mode treats your search term as a literal string, automatically escaping any characters (like "." or "$") that would otherwise have special meaning in a regular expression - so searching for "3.14" matches exactly that, not any character followed by "14". Regex mode gives you full regular expression power (character classes, quantifiers, groups) for pattern-based find and replace, at the cost of needing to write valid regex syntax.
"Replace first" is useful when a pattern legitimately matches multiple places in a text but you only want to fix one specific occurrence - for example, correcting the first typo of a repeated word without touching later instances that might be intentional or already correct. "Replace all" is the more common case, but having both avoids the need to manually pick out a single match through workarounds.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools