📝 Text tools

Find and replace text

Paste your text, type what to find and what to replace it with, and copy the result. Options for case, whole words and regular expressions. Nothing is uploaded.

Free · no signup Runs in your browser

ResultType what to find

How do I find and replace text online?

Paste your text, type the word or phrase to find and what to replace it with, and the replaced text appears at once with a count of matches and a highlighted preview. Tick Match case or Whole word as needed. Tick Regular expression to use patterns, where $1 in the replacement stands for the first group. Everything is done in your browser.

More than a replace box

A word processor's find and replace works inside the document you have open. Sometimes the text is in a form, an email, a spreadsheet cell or a code editor with no such feature. Pasting it here lets you replace every match in one go and see exactly what changed.

The highlighted preview shows the matches in the original text before you copy the replacement, so you can catch a pattern that matched more than you meant. 'Whole word' stops 'cat' from matching inside 'category'. 'Match case' separates 'US' from 'us'. Regular expression mode lets you match patterns instead of fixed text, for example the digits of a phone number or a date, and use groups in the replacement.

It runs in your browser. What you paste is never sent anywhere, and there is no sign-up.

How it works in detail

In the default plain mode the text you type in 'Find' is searched for exactly as typed, so characters such as a dot, a bracket or a dollar sign have no special meaning. 'Match case' is off by default, so Cat, cat and CAT all match; tick it to match only the exact case. 'Whole word' makes a match count only when it is not touching a letter, digit or underscore on either side, so 'cat' does not match inside 'concatenate'. 'Regular expression' switches to pattern matching with JavaScript's rules and Unicode support, and in the 'Replace with' box $1, $2 and so on stand for the groups you captured and $& for the whole match. Every match is replaced at once, and the count and a highlighted preview show what was found. A pattern that could match an empty string is skipped, to avoid endless loops.

How to use it

  • Paste your text into the first box.
  • Type what to find, and what to replace it with (leave the second box empty to delete the matches).
  • Tick Match case or Whole word if you need them. Tick Regular expression only if you want pattern matching.
  • Check the number of matches and the highlighted preview.
  • Copy the replaced text from the result box.

What changes and what stays the same

What the tool does to your text, and what it leaves alone.

What changes and what stays the same
AspectWhat happens
Text outside the matchesUnchanged
Case of the replacementInserted exactly as you typed it
Number of replacementsShown, so you can see that nothing unexpected changed
Special characters in plain modeTreated as ordinary characters
Your original textStill in the first box until you change it
PrivacyThe text stays in your browser: it is not uploaded, saved or logged

When to use it

  • Replacing a name or term throughout a long text
  • Changing a date or number format using a pattern
  • Cleaning up text before you paste it somewhere
  • Checking how many times a word appears

Problems you may run into

Most problems come from the text you paste, not from the tool.

Problems you may run into, and what to do
What you seeLikely causeWhat to do
Zero matchesThe text differs by case, spacing or punctuation, or Whole word is onUntick Match case and Whole word, and check the spelling and spaces
Too many matchesThe find text is a part of other wordsTick Whole word, or make the find text longer
The replacement shows $1 literallyRegular expression is off, or the pattern has no groupTick Regular expression and put the part to keep in brackets
'Invalid pattern'A regular expression has a syntax error, such as an unclosed bracketFix the pattern, or untick Regular expression to search for the text as typed
The page freezesA very complicated pattern on very long textSimplify the pattern or work on smaller sections
Line breaks do not matchIn a pattern, a line break is \nUse \n in regular expression mode

Mistakes it helps you avoid

  • Replacing part of a longer word: use Whole word.
  • Missing matches because of capital letters: leave Match case off.
  • Using special characters in plain mode: they are treated literally unless you choose regular expressions.
  • Replacing without looking: check the preview first.

How it works

Everything happens in your browser as you type.

  • plain mode = your text is searched for exactly as typed (special characters have no special meaning)
  • whole word = a match must not touch a letter, digit or underscore on either side
  • match case = off by default, so Cat, cat and CAT all match
  • regular expression = the pattern follows JavaScript rules; $1, $2 are groups and $& is the whole match in the replacement
  • result = every match replaced; the number of matches is shown

Regular expressions use the JavaScript syntax with Unicode support. A pattern that can match an empty string is skipped to avoid endless loops. Very complicated patterns on very long texts can be slow, since they run on the page itself.

Example: changing a name

You replace 'colour' with 'color' in the text 'The colour of the colourful car.' using Whole word.

  1. Findcolour
  2. Whole wordon
  3. Matches1 (colourful is not matched)

The color of the colourful car.

Without Whole word, colourful would also change.

Terms on this page

Regular expression
A pattern that describes text to match, such as three digits in a row.
Capture group
A part of a pattern in brackets whose match can be reused as $1, $2 and so on.

Common questions

How do I replace only whole words?

Tick 'Whole word'. A match then cannot touch a letter, digit or underscore on either side.

Can I use regular expressions?

Yes. Tick 'Regular expression'. Use $1 for the first group and $& for the whole match in the replacement.

Why did it not find my text?

Check Match case, and in plain mode remember that characters such as . and * are searched for literally.

Is my text uploaded?

No. It is processed in your browser and never sent anywhere.

Does it replace every match?

Yes. All matches are replaced, and the count is shown.

Where these numbers come from

Last verified 2026-10-25 The method on this page is checked against the sources above at least once a year. Spotted something out of date? Tell us and we will fix it.

📝 Text tools

Small text jobs done in your browser: counting, converting, comparing and cleaning. What you type never leaves your device.

See all 17 tools in this section