Find and Replace
Paste your text, type what to find and what to put instead, and see every match counted and marked before you replace them all.
Up to 5 million characters. It stays on this page: nothing is sent anywhere or saved.
Found exactly as typed. To find a line break, press Enter in this box.
A JavaScript regular expression, without slashes. ^ and $ match at the start and end of each line; a dot doesn’t match a line break.
Put in exactly as typed. Leave it empty to delete each match.
$1 or $<name> puts in a group, $& the whole match, $$ a dollar sign. Leave it empty to delete each match.
Type what to find, and paste the text to search in.
Matches in the text
After Replace all
Change every copy of a word or phrase at once
A product renamed, a misspelled name repeated through a long document, a date format to switch in a list: a careful find and replace does in seconds what retyping takes an afternoon. This tool shows every match before anything changes, so you can see exactly what Replace all will touch.
How to use it
- Paste or type your text. Press Try an example to see how it works first.
- Type what to find. Each match is counted and marked in the preview as you type.
- Type what to put instead, or leave it empty to delete each match.
- Press Replace all, then copy or download the new text.
What the options do
- Plain text finds exactly what you typed, symbols and all.
- Regular expression reads Find as a JavaScript pattern, for things like “any date” or “a word at the start of a line”.
- Match case treats “May” and “may” as different. Off, it finds both.
- Whole words only skips matches inside longer words, so club doesn’t change clubhouse.
Regular expressions
Groups in brackets can be put back in a new order. Find (\d{4})-(\d{2})-(\d{2}) and replace
with $2/$3/$1 to turn 2026-11-05 into 11/05/2026. A caret, ^, matches the start of
every line, so replacing it with a dash and a space turns lines into a list. Patterns are read in Unicode mode,
so an emoji counts as one character and classes such as \p{L} (any letter) work.
Good practice
- Look before you replace. Scroll the preview and check that every marked match is one you mean to change.
- Use Whole words only for short words, so replacing “art” leaves “start” and “party” alone.
- Make one change at a time. After each Replace all, press Use as the text, then search for the next.
Good to know
- Limits: up to 5 million characters of text, and 1,000 in Find and in Replace with. The first 2,000 matches are marked in the preview; every match is counted and replaced.
- Runaway patterns are stopped after 2 seconds, so the page never freezes.
- Your original stays put. The new text appears below it; nothing changes until you choose to use it.
- Building a pattern? The Regex Tester lists each match’s position and groups, for checking a pattern before it goes into code. This page is for changing text.