Find and Replace

Find every occurrence of a word or pattern and replace it instantly — with case sensitivity and full regex support.

🔒 100% private — files are processed on your device and never uploaded to any server.

Change every instance at once — including the ones you'd miss

The client renamed the product. The document spells the surname three ways. Every “2025” needs to read “2026”, the curly quotes must become straight ones, and there are 47 occurrences scattered through the text. Manual hunting misses some; this tool doesn't. Paste the text, define find and replace, and every match converts in one click — with a count telling you exactly how many. For power users, a regex switch turns simple substitution into pattern surgery.

How to find and replace

  1. Paste your text into the top box.
  2. Enter the text to find and its replacement.
  3. Set the switches: case-sensitive if Capital and capital differ; regular expression for patterns.
  4. Click Replace all — the result appears with a replacement count.

The switches in real use

Case-insensitive (default) catches the misspelled wild: iPhone, Iphone, IPHONE all match a find of “iphone” — ideal for normalising brand names, though note the replacement inserts your exact replacement string everywhere (which is usually the point: everything becomes the one correct form). Case-sensitive mode protects legitimate differences — replacing the variable id without touching ID, fixing “polish” but not “Polish”. An empty replacement field is allowed and useful: it deletes every match, the fastest way to strip a recurring artefact from pasted text.

Regex: the find that matches shapes, not strings

Tick the regular-expression switch and the find field accepts patterns: \d{4} matches any four-digit year, colou?r matches both spellings, \s+$ matches trailing whitespace on lines, (Mr|Mrs|Ms)\. matches any honorific. Capture groups work in replacements — find (\w+)@old-domain\.com, replace $1@new-domain.com, and every email migrates while keeping its local part. Invalid patterns produce a clear error message rather than silent failure. (No regex knowledge? Ignore the switch entirely — plain mode treats every character literally.)

Recipes worth stealing

  • Strip PDF hyphen damage: find - (hyphen-space), replace with nothing — after our Remove Line Breaks tool.
  • Straighten curly quotes: find [“”] (regex), replace ".
  • Collapse multiple spaces: regex {2,} → single space.
  • Year rollover: find 2025, replace 2026 — then proofread the matches that shouldn't have rolled (the count warns you how many to check).

One pass, every instance, a number you can trust — and the text never leaves your browser.

Quick reference

PropertyDetail
ScopeAll occurrences in one pass, with count
Case switchSensitive or insensitive matching
Regex modeFull JavaScript regex + $1 capture groups
Delete trickEmpty replacement removes all matches
ErrorsInvalid regex reported clearly
OriginalsInput box untouched — result is separate
Processing100% in-browser, no upload

Frequently asked questions

Can I just delete every occurrence of something?

Yes — leave the replacement field empty and Replace All removes every match. Combined with regex (e.g. find \[\d+\] to strip footnote markers), it's the fastest text-cleaning move there is.

What does the regular expression switch actually do?

It makes the find field match patterns instead of literal text: \d{4} = any four digits, colou?r = both spellings, ^\s+ = leading whitespace. With it off, every character — including dots and brackets — is taken literally.

How do I replace whole words only, not parts of words?

Use regex mode with word boundaries: \bcat\b matches “cat” but not “category”. It's the standard cure for the replace-inside-words accident.

Why does the count matter?

It's your sanity check. Expecting ~12 replacements and seeing 240 means the find was too broad — inspect before trusting the result. Zero means a typo in the find term (or the wrong case setting).