Find And Replace Text

Find and replace any word or phrase across a whole block of text at once, with case and regex options. No signup. Ideal for editing, cleaning data and reformatting.

Remove Ads
Remove Ads

Result

Result
Remove Ads

Share on Social Media:

A find and replace tool swaps any word or phrase across an entire block of text at once — free, with no account. Paste your text, enter what to find and what to replace it with, and it changes every occurrence in one click, then tells you how many replacements it made. It runs entirely in your browser, so nothing is uploaded or stored. It replaces in one block of pasted text at a time, with two matching options: case-insensitive, and regex. There is no whole-word option, so if your word can appear inside a longer word, use the regex workaround shown below.

On this page

  1. How to Find and Replace Text Step by Step
  2. How Find and Replace Works, From Word Processors to Regex
  3. Online Tool Versus a Word Processor or Code Editor
  4. Who Uses Find and Replace
  5. Pro Tips for Precise Replacements
  6. Common Find and Replace Mistakes to Avoid
  7. Related Tools You May Need Next
  8. Frequently Asked Questions

How to Find and Replace Text Step by Step

  1. Paste your text. Drop the full block of text into the input box. It can be a document, a list, code, a data export, or anything where you need to change a recurring word or phrase.
  2. Enter the find term. Type the exact word or phrase you want to locate. Every occurrence will be targeted, so be as specific as needed to avoid catching unintended matches.
  3. Enter the replacement. Type what should take its place. Leave it blank to delete the found term entirely, which is a quick way to strip out an unwanted word throughout the text — though the spaces around it stay, so check for double spaces afterwards.
  4. Set your matching options. Tick Case-insensitive if the find term should match regardless of capitalisation, or Treat "Find" as regex if you want to match a pattern instead of a literal word. Leave both unticked for an exact, case-sensitive match.
  5. Click Replace and copy. The tool applies every replacement at once, shows the result, and tells you how many replacements it made. Copy the updated text back into your document, spreadsheet or editor with a single click. Typing alone does nothing — you must click the button.

Illustration of text being found and replaced in a document editor

How Find and Replace Works, From Word Processors to Regex

Find and replace is one of the oldest and most powerful features in text editing, dating to the earliest word processors and line editors of the 1970s. The idea is simple but transformative: instead of hunting through text and changing each occurrence by hand, you describe what to find and what to substitute, and the machine changes every instance in a single operation. For a term appearing hundreds of times, this turns an hour of tedious, error prone editing into a moment. This tool does that for one block of pasted text, directly in your browser.

The two matching options control precision. Case sensitivity decides whether the find term must match capitalisation exactly, so that replacing cat does or does not also catch CAT. With the default case-sensitive setting, cat in The cat sat on the cat mat. CAT naps. is replaced twice and CAT is left alone; with Case-insensitive ticked, it is replaced three times. Regular expressions, usually shortened to regex, elevate find and replace from literal words to patterns: the pattern c.t matches cat, cot and any other three-letter word starting with c and ending with t, because . stands for any character.

The count the tool shows is the number of matches it found, and every match is replaced in the same pass. There is no whole-word option in this tool, so a plain find of cat also matches inside category and scatter — category becomes dogegory and scatter becomes sdogter. If that matters, tick the regex box and search for \bcat\b, where \b means a word boundary, so only the standalone word is matched. An invalid regex, such as a lone [, stops with an Invalid regex message and changes nothing, and an empty text box or an empty Find field stops with an Invalid Input message. Because there is no undo and no replace-one-at-a-time mode, always read the result and its replacement count before copying it back.

FindReplace withOptionsReplacementsResult
catdogCase-sensitive (default)2The dog sat on the dog mat. CAT naps.
catdogCase-insensitive3The dog sat on the dog mat. dog naps.
c.tdogRegex on2The dog sat on the dog mat. CAT naps.
old(blank)Case-sensitive3Remove the word   . (the word is deleted, the spaces stay)
catdogCase-sensitive3The dog is in the dogegory and the sdogter plot.

The last row is the whole-word trap: the input was The cat is in the category and the scatter plot. Without a whole-word option, cat inside longer words is replaced too. Use \bcat\b in regex mode to match only the standalone word.

Online Tool Versus a Word Processor or Code Editor

ToolBest forWhat it offersWhat it lacks
This online toolQuick bulk edits to any pasted textOne block of text at a time, case and regex options, replacement count, runs in your browser with nothing to installNo file handling, no whole-word option, no replace-one-at-a-time, no undo
Word processor find and replaceEditing a document you already have openWhole-word and case options, replace one at a time, preview matchesTied to the document, slower for text from elsewhere
Code editor find and replaceDevelopers working across filesPowerful regex, replace across many files, preview matchesRequires the editor, more complex, overkill for plain text

The online tool wins when the text is already on your clipboard and you want every occurrence changed in one click; reach for an editor when you need whole-word matching without regex, per-match control, or files on disk.

Who Uses Find and Replace

Writers and editors fixing a recurring name or term. A writer renames a character or a product throughout a draft, changing every occurrence in one click instead of hunting through the document.

Data cleaners tidying exports. Someone cleaning a spreadsheet export or a list swaps a wrong code or label everywhere it appears, then checks the replacement count against what they expected.

Developers renaming identifiers in pasted code. A developer pastes a snippet and renames a variable or a string throughout it, using regex mode for patterns such as dates or IDs.

Students and researchers standardising terminology. A student replaces an old term with the current one across an essay or notes, making the wording consistent in seconds.

Anyone stripping an unwanted word. A person deletes a repeated filler word or a stray placeholder from a whole block by leaving the replacement blank.

Laptop showing a find and replace interface with before and after text

Pro Tips for Precise Replacements

Be specific with the find term. The more exact the term, the fewer unintended matches — a short word like is or cat can hide inside longer words, so add surrounding words or spaces when you can.

Use regex word boundaries instead of whole-word mode. This tool has no whole-word checkbox, so tick regex and search for \bcat\b to match only the standalone word and leave category and scatter alone.

Tick Case-insensitive only when you mean it. With it off, CAT survives a cat replacement — with it on, every capitalisation is replaced, and the replacement is inserted exactly as typed, without preserving each match's capitalisation.

Test a regex on a copy first. A pattern such as c.t matches more than cat — try it on a small sample and read the count before running it on the full text.

Leave the replacement blank to delete. An empty replacement removes every match, which strips an unwanted word throughout the text — then check for the double spaces it leaves behind.

Watch out for $ in the replacement. $& inserts the matched text, so replacing 10 with $& changes nothing — use $$ if you literally need a dollar sign in the replacement.

Read the replacement count. The N replacement(s) made. line is your check — if the count is higher or lower than expected, something matched that should not have, or a spelling differs.

Copy before you paste back. There is no undo, so read the result in the tool first and only then copy it into your document.

Common Find and Replace Mistakes to Avoid

Assuming there is a whole-word option. There is not — replacing cat corrupts category into dogegory and scatter into sdogter; use \bcat\b in regex mode when the word can appear inside longer words.

Replacing without checking the count. Every match is replaced at once with no undo, so a wrong find term can damage a whole document in one click — read the replacement count and the result before copying.

Forgetting case sensitivity. The default is case-sensitive, so cat leaves CAT untouched — if you want every capitalisation changed, tick Case-insensitive first.

Using an invalid regex. A broken pattern such as a lone [ stops with an Invalid regex notice twice and changes nothing — but only when the regex box is ticked. With regex off, the same [ is treated as a literal character and matches nothing, so the count reads '0 replacement(s) made.' with no error. Test the pattern on a small sample first.

Expecting the result to update as you type. Nothing happens until you click Replace — typing alone does nothing.

Using $ in the replacement without knowing its meaning. $& inserts the matched text, so a replacement of $& leaves the text unchanged — write $$ for a literal dollar sign.

Deleting without checking the spaces. Leaving the replacement blank removes the word but not the spaces around it, so Remove the word old old old. becomes Remove the word   . — tidy the double spaces afterwards.

Pasting text with different spellings. If the same word appears with different capitalisation or spelling, one replacement will miss some occurrences — run a case-insensitive pass, or repeat with each variant.

Leaving a required field empty. An empty text box or an empty Find field shows an 'Invalid Input' notice once and the browser also shows a 'Please fill out this field.' bubble. Any previous result stays unchanged. Fill in both the text and the find term first.

Related Tools You May Need Next

Reverse Text Generator. Reverse text and words.

Word Counter. Count the words in the result.

Case Converter. Change the capitalisation of text.

Whitespace Remover. Tidy extra spaces in pasted text.

Text Repeater. Repeat lines of text.

Sort Text Lines. Sort lines of text.

Remove Duplicate Lines. Drop repeated lines from text.

3D illustration of text being found and replaced with a search and count panel

Frequently Asked Questions

How do I find and replace text online?

Paste your text into the input box, type the word or phrase to find, type what should replace it, and click Replace. The tool changes every occurrence at once and tells you how many replacements it made. Copy the result back into your document. Leave the replacement blank to delete the found term throughout the text.

Does this tool have a whole-word option?

No. There is no whole-word checkbox — only Case-insensitive and Treat "Find" as regex. A plain find of cat also matches inside category and scatter, turning them into dogegory and sdogter. To match only the standalone word, tick the regex box and search for \bcat\b, where \b means a word boundary.

What is the difference between case-sensitive and case-insensitive?

Case-sensitive, the default, matches capitalisation exactly: finding cat replaces the two lowercase occurrences in The cat sat on the cat mat. CAT naps. and leaves CAT alone. Case-insensitive matches every capitalisation, replacing all three — but the replacement is inserted exactly as typed, without preserving each match's capitalisation, so CAT becomes dog, not DOG.

How do I use regex in find and replace?

Tick the "Treat 'Find' as regex" box, then type a regular expression as the find term. For example, c.t matches any three-letter word starting with c and ending with t, and \bcat\b matches only the standalone word cat. If the pattern is invalid, such as a lone [, the tool stops with an Invalid regex message and changes nothing.

How do I delete a word from a whole text?

Enter the word in the Find field and leave the Replace field blank, then click Replace. Every occurrence is removed. The spaces around the deleted words stay, so Remove the word old old old. becomes Remove the word   . — tidy the double spaces afterwards.

How many replacements were made?

The tool shows the count above the result, as N replacement(s) made. It counts every match it found and replaced. Read it before copying the result back — if the count is higher or lower than expected, something matched that should not have, or a spelling differs.

Why did replacing "cat" change "category" too?

Because this tool has no whole-word option, a plain find matches inside longer words. Replacing cat with dog in The cat is in the category and the scatter plot. makes three replacements and turns category into dogegory and scatter into sdogter. Use regex mode with \bcat\b to match only the standalone word.

What does "$&" do in the replacement?

In the replacement field, $& is a special pattern that inserts the text that was matched. So replacing 10 with $& in Price is 10. leaves it unchanged. If you literally need a dollar sign in the replacement, write $$ instead.

Does the tool work on files?

No. It works on one block of text that you paste in — there is no file upload and no Save or download button, only a Copy button for the result. For files on disk, use a word processor or code editor, which can find and replace across documents.

Is the find and replace tool free?

Yes, it is completely free with no account and no usage limit. You can replace words and phrases in as many blocks of text as you like, as often as you like, at no cost. It runs entirely in your browser on any device — paste your text, enter the find and replacement terms, click Replace, and copy the result.