Find and Replace

Replace text with find-and-replace across any document - with optional regex, case sensitivity, whole-word matching and a live replacement count.

Updated September 2026 · Written and verified by Akash Pandey

Find and Replace

How to use the find and replace tool

  1. Paste your text into the first box.
  2. Enter the Find term and the Replace text.
  3. Toggle Regex, Case sensitive or Whole word as needed - a preview shows how many matches will change.
  4. Click Replace all and copy the output.

Frequently asked questions

Does it support regular expressions?

Yes - flip on Regex and the Find box becomes a JavaScript regex, e.g. \d{4} matches four-digit groups. Invalid patterns produce a readable error.

How do I swap two words?

Replace "A" with a placeholder like "@A@", then "B" with "A", then "@A@" with "B" - classic swap technique.

Can I replace across multiple occurrences?

Yes - Replace all handles every match, and the counter above the button confirms how many were changed.

What does "Whole word" do?

It only matches whole words, so "car" does not match "carpet" or "scare".

Is my text kept private?

Entirely - the processing happens in the browser and nothing is transmitted.

Does this tool support regular expressions (regex)?

Yes. You can toggle the "Regex" checkbox to perform advanced pattern matching and replacements using standard JavaScript regex syntax.

Can I match whole words only?

Yes. Checking "Whole word" ensures that searching for "cat" will not accidentally replace letters inside "caterpillar" or "scatter".

Does find-and-replace support multiline text?

Yes. You can search across and replace multiline blocks of text, code, or configuration files.