Find and Replace Text
Paste your text, enter what to find and what to put in its place, and every match is replaced in one go, with a count of the changes. You can match case, match whole words only, or leave the replacement empty to delete the phrase. Free, no sign-up, and the text never leaves your browser.
How to Use Find and Replace
- Paste your text into the Your text box.
- Enter what to find and what to replace it with. Leave Replace with empty to delete every match.
- Set the options. Case-sensitive matches capital letters exactly; Whole word only skips matches that sit inside a longer word.
- Click Replace All. The new text appears under Result with three cards: Replacements made, Input characters and Output characters. Copy it when you are happy.
How Matching Works
What you type in Find is matched literally, exactly as written. Characters that have special meaning in pattern languages — a full stop, a dollar sign, brackets, a plus sign — are treated as ordinary characters, so you can search for $5, (draft) or a.b without any escaping. This is not a regular-expression tool; if you need patterns, use the Regex Tester to build one.
The replacement is also literal. If you type $& in Replace with, those two characters are inserted as they are. Matches are found left to right and never overlap, and a replacement is not searched again, so replacing a with aa does not run away.
A Worked Example: Why Whole Word Matters
Replace cat with dog in this sentence, using different option settings:
Input
The cat sat on the catalog. Cat's toy: a concat of cat, Cat and CAT.
Defaults (any case, any position): 7 replacements
The dog sat on the dogalog. dog's toy: a condog of dog, dog and dog.
Whole word only: 5 replacements
The dog sat on the catalog. dog's toy: a concat of dog, dog and dog.
Case-sensitive + whole word: 2 replacements
The dog sat on the catalog. Cat's toy: a concat of dog, Cat and CAT.
With the defaults the tool damages catalog and concat, which is why the count is worth checking against what you expected. Whole word only protects them, and it still replaces Cat's, because an apostrophe ends a word. Case-sensitive leaves Cat and CAT alone. Note that the replacement is inserted exactly as typed, so Cat's became dog's, not Dog's: the tool does not copy the capitalisation of the text it replaces.
What Counts as a Word
Whole-word matching treats a letter, digit or accent mark in any script, plus the underscore, as part of a word. A match counts only when the characters on both sides of it are not part of a word, so it works for terms such as café, C++ and Dr. as well as plain English. Two things to watch for: a term is still found next to punctuation but not glued to other letters (Dr. matches in "Dr. Smith" but not in "Dr.Smith"), and an apostrophe or hyphen ends a word, so cat also matches in Cat's and in cat-flap. Check the count against what you expected.
Which Tool Do You Need?
| If you want… | Use |
|---|---|
| One phrase replaced everywhere | This page |
| Several different replacements in one pass, in order | Multi Word Replacer |
| A list of words deleted, or common stop words stripped | Remove Words From Text |
| Whole lines kept or deleted when they contain a word or pattern | Line Filter |
| Punctuation stripped from text | Punctuation Remover |
| Changes between two versions compared | Text Diff Checker |
Frequently Asked Questions
- How do I find and replace text online?
- Paste your text, type the word or phrase to find, type its replacement, and click Replace All. Every match is replaced at once and the Replacements made card shows how many there were.
- How do I delete a word everywhere in a text?
- Enter the word in Find, leave Replace with empty and click Replace All. Every match is removed. You may be left with a double space where the word was, so check the result, or use Remove Words From Text, which tidies the spaces for you.
- What does Whole word only do?
- It matches the search term only when it stands alone as a word, so cat is found in "the cat sat" but not in catalog. It also works for terms that start or end with a symbol or an accented letter, such as C++, Dr. or café.
- Is the search case-sensitive?
- Not unless you tick Case-sensitive. By default cat matches cat, Cat and CAT. The replacement is inserted as typed, so it does not adopt the capitalisation of the text it replaces.
- Can I use regular expressions?
- No. The Find box is taken literally, so characters like . and * mean themselves. Use the Regex Tester to build a pattern.
- Can I replace line breaks or tabs?
- Not with this tool, since the Find box is a single line and cannot hold a line break. To join lines, use the Remove Line Breaks tool.
- Is my text uploaded?
- No. The replacement runs in your browser and the text is not sent or stored.