Find and Replace
Find and replace words or patterns in text, with match case, whole-word and regex options.
Inserted exactly as typed. Leave empty to delete the matches.
Paste your text and enter what to find.
Matches in your text
Line breaks: Windows (CRLF), as in the text you pasted — kept when you copy or download the result.
Swap words, phrases or patterns throughout a block of text
Find and Replace changes every occurrence of a word, phrase or pattern in text you paste, then hands back the result to copy or download as a .txt file. As you type, it counts and highlights the matches, so you can check what will change first.
By default the Find text is taken literally: a dot is a dot and brackets are brackets. Switch on regular expressions when you need patterns such as “any number” or “the start of every line”. Everything runs in your browser; the text isn’t uploaded anywhere.
How to find and replace text
- Paste or type your text into the Text box.
- Enter what to look for in Find, and what to put in its place in Replace with. Leave Replace with empty to delete the matches.
- Tick Match case, Whole words only or Use regular expression if you need them. The match count and the highlighted preview update as you type.
- Click Replace all. The result appears below, with buttons to copy it or download it as a .txt file.
- To make another change on top, click Use result as new text and repeat. Reset to original brings back the text you started with.
Reading the count and the preview
- Match count: how many times the Find text occurs with the current options. Replace all replaces exactly that many.
- Highlighted preview: your text with each match marked. Neighbouring matches alternate between two tints and are underlined. Up to 1,000 matches are highlighted; beyond that the count is still exact and every match is still replaced.
- Line breaks: line breaks outside a match are left alone. If the text you pasted used Windows (CRLF) line breaks, the copied and downloaded result uses them too.
Everyday find-and-replace jobs
- Renaming: update a product, person or company name across a draft, with whole words on so longer words that contain it stay untouched.
- Reformatting lists: in regex mode, find ^ and replace with “- ” to turn lines into a bulleted list, or find , and replace with a line break typed into the Replace with box.
- Rearranging data: swap “Surname, First name” to “First name Surname” with capture groups.
- Clean-up: remove trailing spaces, then tidy the rest with Text Cleaner.
How matching and replacing work here
Plain text vs regular expressions
In plain mode both boxes are literal. Searching for “$5 (approx.)” finds exactly that, and a replacement such as “$1” or “$&” is inserted exactly as typed.
In regex mode the Find box is a JavaScript regular expression, with ^ and $ matching at the start and end of every line. The replacement understands $1 and $<name> for groups, $& for the whole match and $$ for a dollar sign. \n isn’t turned into a line break; press Enter in the Replace with box instead. To build a pattern step by step, use the Regex Tester.
What counts as a whole word
The usual regex word boundary, \b, only knows the letters A–Z, digits and the underscore, so it would treat “caf” as a whole word inside “café”. This tool checks the characters on either side of a match instead: a match only counts when it isn’t touching a letter from any alphabet, an accent mark, a digit or an underscore. “café” is found in “a café, please” but not in “cafés”, and the same works for Greek, Cyrillic and other scripts.
Punctuation isn’t part of a word, so a whole-word search for “c++” finds it before a space or a full stop. In regex mode, whole words switch on Unicode mode, which rejects needless escapes like \- outside square brackets; the error message says so.
Patterns that take too long
Some regular expressions, such as (a+)+$, can take an extremely long time on certain text. The search runs in the background and is stopped after one second with a message, so the page never freezes.
Find and Replace: common questions
Why doesn’t $1 work in my replacement?
Capture groups only exist in regex mode. In plain mode the replacement is inserted literally, so $1 appears as typed. Tick Use regular expression and put the part you want to keep in brackets in the Find box.
Is the search case-sensitive?
Not unless you tick Match case. Without it, “the” also finds “The” and “THE”, including accented capitals such as “CAFÉ”. Letters with and without accents are still different: “cafe” doesn’t find “café”.
Can I undo a replacement?
Replace all never changes the Text box; it writes the result to a separate box. If you’ve used Use result as new text, Reset to original brings back the text as it was before your first replacement.
Why does the count say more matches than are highlighted?
The preview highlights the first 1,000 matches to keep the page responsive. The count includes every match, and Replace all replaces all of them.
Is my text sent anywhere?
No. Matching and replacing happen in your browser, and nothing is stored once you leave the page. More tools for working with text are in Text Tools.

