Find & Replace Text

Find and replace text online with case-sensitive, whole-word and regular-expression modes, live match count and highlighted preview.

🔒 Private by design: this tool runs 100% in your browser. Your files and data are never uploaded to any server.

Search and Replace in Any Text — with Real Power Under the Hood

Find-and-replace is the most-used editing command ever invented, yet the version built into many web forms and note apps is barely there: no case control, no whole-word matching, certainly no patterns. This tool brings proper find-and-replace to any text you can paste: simple substitutions for everyday fixes, and full regular-expression mode for surgical, pattern-based edits — with a live match counter and a highlighted preview so you always see what will change before it changes. All processing is local to your browser.

How to Use It

  1. Paste your text into the editor.
  2. Type the search term. The match counter and yellow highlights update live, showing every occurrence.
  3. Type the replacement (leave it empty to delete matches).
  4. Toggle the modes you need: Match case, Whole words only, or Regular expression.
  5. Click Replace all, review the result, and copy it out. The original input is kept, so a wrong replacement is one click from being redone differently.

The Three Modes Explained

Match case distinguishes “Polish” from “polish”. Off by default, because most everyday replacements are case-blind; turn it on when capitalization carries meaning. Whole words only prevents the classic embarrassment of replacing “cat” inside “category”: matches must stand alone, bounded by spaces or punctuation. Regular expression mode unlocks patterns: \d+ matches any run of digits, colou?r matches both spellings, ^\s+ matches leading whitespace on each line. Capture groups work in replacements — searching (\w+), (\w+) and replacing with $2 $1 swaps “Lastname, Firstname” into “Firstname Lastname” across an entire roster in one click.

Replacements People Run Every Day

  • Fixing a repeated misspelling or an outdated product name through a whole document.
  • Converting straight quotes to typographic ones, or double spaces to single, after pasting from old files.
  • Cleaning data exports: stripping currency symbols, normalizing separators, deleting unwanted prefixes.
  • Reformatting lists with regex — adding a prefix to every line (^ → replacement), or removing trailing whitespace (\s+$ → empty).
  • Anonymizing samples by replacing names or emails (\S+@\S+\.\S+) with placeholders before sharing.

Safety Rails Worth Knowing

The live highlight is the real safety feature: regex in particular can match more than intended, and seeing the matches lit up catches that before any damage. Invalid regular expressions are reported with the browser's error message rather than failing silently. Replacement is all-at-once by design — for selective replacement of only some occurrences, refine the pattern (often with whole-word mode or a more specific regex) until the highlights show exactly the right set. And as with every text tool on this site, the content never leaves your machine: contracts, source code and customer data can be transformed with the same privacy as a desktop editor, but with no installation and no document size anxiety — hundreds of thousands of characters process instantly.

A last piece of advice for regex newcomers: build patterns incrementally with the live highlight as your guide. Start with the literal text, confirm it matches, then generalize one piece at a time — a \d+ here, an optional group there — watching the highlights after each change. This converts regular expressions from an intimidating syntax into a feedback loop, and the skill transfers directly to every editor and language you will ever use them in.

Frequently Asked Questions

How do I avoid replacing “cat” inside “category”?

Enable “Whole words only”. Matches must then stand alone, bounded by spaces or punctuation, so embedded occurrences inside longer words are skipped.

Can I use capture groups in replacements?

Yes. In regex mode, parentheses capture text and $1, $2 and so on insert it into the replacement — for example (\w+), (\w+) replaced with “$2 $1” swaps name order across a whole list.

What happens if my regular expression is invalid?

The tool shows the browser’s exact error message under the search box and performs no replacement, so a malformed pattern can never silently corrupt your text.

Can I replace something with nothing to delete it?

Yes — leave the replacement field empty and every match is removed. The highlighted preview shows exactly which text will disappear before you commit.