The fastest way to find and replace text is to paste your block into a tool, type what you are looking for and what should take its place, and let it swap every occurrence at once. No spreadsheet formulas, no command line, no risk of missing one. Here is how to do it cleanly, including case sensitivity, whole-word matching, and regex for patterns.
Find and replace text in four steps
- Open the Find & Replace tool and paste your text into the input box.
- Type the string you want to find, then type its replacement.
- Choose your options: case sensitivity, whole word, and regex mode (covered below).
- Run it and copy the result.
Everything happens in your browser, so even sensitive text like config files, customer data, or draft emails never leaves your device.
Case sensitivity and whole-word matching
Two switches change how matches are found:
- Case sensitive: when on,
Catmatches onlyCat, notcatorCAT. Turn it off to catch every variation regardless of capitalization. This matters when you are renaming a variable or fixing a brand name that appears in mixed case. - Whole word: when on, searching
artwill not touchstart,cart, orparty. It only matchesartstanding on its own. Use this whenever your search term is a fragment of larger words you want to leave alone.
Combine the two when you need precision, like replacing a standalone, correctly-cased token without disturbing anything around it.
Regex find and replace for patterns
When you need to match a shape rather than a fixed string, switch on regex mode. A few safe, common examples:
- Collapse multiple spaces into one: find
\s{2,}and replace with a single space. Great for cleaning text pasted from PDFs. - Trim trailing spaces on each line: find
+$(with the multiline flag) and replace with nothing. - Strip blank lines: find
\n{2,}and replace with\n\nto normalize spacing.
Regex also supports capture groups, which let you keep part of the match and reorder it. Wrap a piece of the pattern in parentheses to capture it, then reference it in the replacement with $1, $2, and so on. For example, to turn Last, First into First Last, find (\w+),\s*(\w+) and replace with $2 $1. The first group becomes the surname, the second becomes the given name, and they swap places.
Regex is powerful, so test on a small sample first. If a pattern matches more than you expected, narrow it with whole-word boundaries (\b) or anchors (^ and $).
Related tools
- Diff Checker: confirm exactly what changed after a bulk replace.
- Line Sorter & Dedupe: sort lines and remove duplicates once your text is clean.
- Case Converter: switch text to upper, lower, title, or sentence case in one click.
Paste, swap, copy, done.