Skip to content
WebKitool

Find and Replace

Replace text across a whole document, with whole-word, case and regex options.

Loading tool…

Processing: This tool runs entirely in your browser. Your input and any file you open stay on your device — nothing is uploaded to a server.

How to use the find and replace

  1. Paste your text and enter what to find.
  2. Check the match count, then set the replacement.
  3. Copy the result, or apply it and search again.

About this tool

The match count updates as you type, so you can see how many replacements a pattern will make before applying it — the check that prevents a careless replace turning 'car' into 'bus' inside 'carpet'. Whole-word matching solves exactly that case.

Regular expression mode passes your pattern straight to the browser's engine, so <code>$1</code> and <code>$2</code> in the replacement reuse captured groups. Ordinary mode escapes everything, so characters like <code>.</code> and <code>*</code> match themselves rather than acting as wildcards.

Common uses

  • Renaming a term throughout a document.
  • Stripping a repeated prefix from every line.
  • Reformatting data with a capture-group pattern.

Frequently asked questions

How do I avoid matching inside longer words?
Tick 'whole words only'. Replacing 'car' without it also hits 'carpet' and 'scarce'.
Can I reuse part of the match in the replacement?
Yes, in regex mode. Wrap part of the pattern in brackets and refer to it as $1 in the replacement.

Related tools