Free online text tool

Search and Replace Text

Search And Replace finds a word or phrase in your text and replaces every match with the text you choose. Paste your text, enter what to find and what to put instead, and copy the result. It is free and runs in your browser.

Search and Text Replace Tool

0Character Count
0Character Count (without spaces)
0Word Count
0Sentence Count
0Paragraph Count
0Line Count

Search & Replace Example

Before (find Greg, replace with John)
Hello my name is Greg and I like to run.
After
Hello my name is John and I like to run.

Bookmark: press Ctrl+D (Windows) or Cmd+D (Mac) to save this tool.

Suggest a New ToolProvide Feedback on This Tool

What does Search And Replace do?

This tool searches your text for a word or phrase and replaces every match with new text. Type what to find and what to put instead, click the button, and the whole text is updated in one go.

By default the search matches capital and small letters exactly. Untick Match case to find a word however it is written, tick Match whole words only so that cat does not change catalog, or replace just the first match and leave the rest.

Use it to fix a name or a spelling mistake everywhere, update a date or a price, change a term in a long document, or clean up text before you use it.

Search and replace examples

Each example shows the text to find and the new text used. Unless an option is named, capital and small letters must match, part of a word counts and every match is replaced.

SettingBeforeAfter
Find Greg, with John
Hello my name is Greg and I like to run.
Hello my name is John and I like to run.
Every match is replaced
cat and cat
dog and dog
Match case, on
Cat cat CAT
Cat dog CAT
Match case, off
Cat cat CAT
dog dog dog
Whole words, off
cat catalog
dog dogalog
Whole words, on
cat catalog
dog catalog
Only the first match
a a a
b a a
Special characters, find 1+1
1+1=2 and 1+1=3
two=2 and two=3
Empty new text, find "two "
one two three
one three
Line breaks stay
a
b a
x
b x

How to search and replace text

  1. 1
    Add your text
    Type or paste your text into the box, or import a text file.
  2. 2
    Enter what to find and what to put instead
    Type the word or phrase to look for in the Find text box and the new text in the Replace with box.
  3. 3
    Click Replace Text
    Every match is replaced. Use Undo if you change your mind.
  4. 4
    Copy it
    Click Copy and paste the result where you need it.

When to use search and replace

Good for

Fixing a name or spelling mistake in every place, updating dates, prices or terms in a long text, and changing a word before you publish or send a document.

Check first

With part-of-word matching, a short word can change inside longer words, so cat becomes dog in catalog. Tick Match whole words only to avoid that. The text you type is used exactly as written, including spaces. The result replaces your text, so use Undo if you need the original.

Other tools

To replace several different words at once, try Bulk Search and Replace. To replace the text between two characters, try Replace Text Between. To change only spaces, try Replace Spaces.

Search and replace FAQ

What does the Search And Replace tool do?

It looks through your text for the word or phrase you enter and replaces every match with the new text you choose.

How do I search and replace text?

Paste your text, type what to look for in the Find text box and the new text in the Replace with box, then click Replace Text.

Does it replace every match or only the first?

Every match by default. Tick Replace only the first match if you want to change just one.

Does it care about capital letters?

By default yes, so Cat and cat are different. Untick Match case to find a word however it is written.

How do I avoid changing part of a longer word?

Tick Match whole words only. Then cat is replaced as a word but left alone inside catalog.

Can I search for special characters like + or ( ?

Yes. Whatever you type is searched for exactly as written, so there is nothing to escape.

Can I leave the replacement empty?

Yes. Every match is deleted, which is a quick way to remove a word or phrase.

What if nothing is found?

The tool shows a message and leaves your text as it is.

Is this tool free and is my text private?

Yes. It is free, needs no account and runs in your browser, so your text is not uploaded to a server.

Looking for more text tools?

Browse Replace Tools

Last updated: 16 November 2026