Skip to content

Text Tools

Find and replace text

Replace plain text or regular expression matches, with a live count of how many replacements were made.

  • Free, no signup
  • No upload — runs on your device
  • No watermark
  • Unlimited use

Find and Replace

Processed locally

The replacement count is the only way to know it worked

The classic find-and-replace disaster is replacing a word that appears inside another word. Replace art with craft and started becomes stcrafted. You will not see it, because it happens on line 340 of a document you already read.

The count guards against this. If you expected twelve replacements and the tool reports thirty-one, stop. Something matched that you did not intend. In plain-text mode, the fix is usually to include the surrounding spaces in your search term. In regex mode, wrap the term in word boundaries: \bart\b matches the word and not the fragment.

Regex mode also unlocks capture groups. Search (\w+)@(\w+)\.com and replace with $2/$1 to reshape every email in a list. The $1 and $2 refer to the parenthesised groups, numbered left to right.

How it works

  1. Paste your text
  2. Type what to find and what to replace it with
  3. Check the replacement count, then copy the result
Why nothing uploads. Every operation on this page happens inside your browser using JavaScript and WebAssembly. Your file is read into memory, processed, and offered back as a download. It is never transmitted. Disconnect from the internet after this page loads and the tool keeps working.

Frequently asked questions

How do I replace a whole word and not part of another word?
Turn on regex and wrap the term in word boundaries, like \bart\b. Without them, "art" matches inside "started". Check the replacement count — an unexpectedly high number means you matched too much.
How do I use capture groups?
Parenthesise part of your pattern and refer to it as $1, $2 and so on in the replacement. Searching (\w+)@(\w+) and replacing with $2:$1 swaps the two halves.
What does the replacement count tell me?
How many matches were replaced. It is your check that the pattern matched what you intended — compare it to what you expected before copying the result.
Can I replace across multiple lines?
Yes. The whole text is treated as one string. In regex mode, use \n to match a newline.
Does replace-all matter?
With it off, only the first match is replaced. With it on, every match is. Off is useful for checking your pattern hits the right thing before committing.