Skip to content
↑↓ to move ↵ to open Esc to close Browse all tools

Find and Replace

Paste your text, type what to find and what to put in its place. Every match is highlighted as you type, then replace them all or step through one by one.

Find and replace

Pairs run in order from top to bottom when you replace all.
Preview
0 of 0

Your text stays in your browser. Nothing is uploaded.

Find and replace without a word processor

Sometimes you need to change the same thing many times in a block of text: a product name that changed, a misspelled word, double spaces, old dates, a placeholder in a template or a domain in a list of links. Editors can do this, but not every app has a good search, and many forms and online tools have none at all. Paste the text here, fix it, and copy it back.

The tool highlights every match while you type, so you see what will change before anything changes. Replace all handles everything in one step. When you want to decide case by case, use Prev and Next to walk through the matches and press Replace this match only where it fits. You can also click a highlighted match to jump to it.

Match case, whole word and regex

  • Match case finds "Apple" but not "apple". Leave it off to find both.
  • Whole word finds "art" as a word but skips the art in "start" and "artist". This prevents the classic mistake of replacing part of a longer word.
  • Regular expression turns the Find field into a pattern. A regex can match any number, any email address or any line that starts with a word, and reuse parts of the match in the replacement.

Several pairs run one after another. Pair 2 sees the text after pair 1 has changed it, so order matters when one replacement creates text that another pair looks for. The count next to each pair shows how many matches it has in the current text.

Regex cheat sheet

The most useful building blocks. Add a backslash in front of a special character to find it literally, for example \. for a period or \$ for a dollar sign.

PatternMeansExampleMatches
.Any single character except a line breakc.tcat, cut, c9t
\dA digit from 0 to 9\d\d42, 07
\wA letter, digit or underscore\w+hello, user_1
\sA space, tab or line breaka\sba b
^Start of a line^NoteNote at the start of a line
$End of a line\.$a period at the end of a line
*The item before it, 0 or more timesgo*dgd, god, good
+The item before it, 1 or more times\d+7, 2026
?The item before it, optionalcolou?rcolor, colour
[abc]One of the listed charactersgr[ae]ygray, grey
( )A group you can reuse in the replacement(\w+)@captures the name before @
$1In Replace with: the text of group 1$2 $1swaps two groups

Regex examples you can copy

  • Swap date format: find (\d{4})-(\d{2})-(\d{2}), replace with $2/$3/$1. 2026-03-14 becomes 03/14/2026.
  • Collapse double spaces: find [ ]{2,}, two or more spaces in a row, and replace with a single space.
  • Remove trailing spaces: find [ \t]+$, replace with nothing.
  • Swap first and last name: find ^(\w+) (\w+)$, replace with $2, $1. Ada Lovelace becomes Lovelace, Ada.
  • Add a bullet to every line: find ^, replace with - .

How to use the find and replace tool

  1. 1Paste your text into the left box. Type the text to find and its replacement in the first pair; add more pairs if you need several changes.
  2. 2Set match case, whole word or regular expression, and check the highlighted matches and the count on the right.
  3. 3Press Replace all, or step through and replace single matches. Undo if something went wrong, then copy the result or download it as a .txt file.

Frequently asked questions

How do I replace text in several places at once?

Type the word or phrase in Find and the new text in Replace with. The preview marks every match and shows the count. Press Replace all and every match is replaced in one go. If you change your mind, Undo last replace brings the previous text back.

What does whole word do?

With Whole word on, "cat" matches only the word cat, not the cat in category or concatenate. A match must not have a letter, digit or underscore right before or after it.

How do I use $1 in the replacement?

Turn on Regular expression and put parentheses around the parts you want to reuse. Each pair of parentheses is a group, counted from the left. In Replace with, $1 inserts the text of the first group, $2 the second and so on. $& inserts the whole match, and $$ a literal dollar sign.

How do I replace line breaks or tabs?

Turn on Regular expression. In Find, \n matches a line break and \t a tab. In Replace with, \n inserts a line break and \t a tab, so finding ", " and replacing it with \n puts each item of a comma separated list on its own line.

Is my text uploaded anywhere?

No. Searching and replacing happen in your browser. Copy link only saves your find and replace pairs and options, never the text itself.