Find and Replace Online: Bulk Replace Text with Regex
Use this find and replace online tool: paste your text, type what to find and what to put in its place, and see the result with every change highlighted. Replace words in text one by one or as a whole list, match case or whole words, and use regex with capture groups. Free and private.
By Troopus · Updated: October 24, 2026
- 🔍 Live highlighted preview
- 📋 Replace many words at once
- 🧩 Regex and capture groups
- 🔒 100% private
Find and replace online in your browser
The result appears here.
How do I find and replace text online?
Paste your text into the box, type the word or phrase to find, type its replacement, and the result appears instantly with every change highlighted. Then copy the result, download it as a .txt file, or click Use result as text to keep editing. Nothing is uploaded; it all runs in your browser.
Find and replace online means searching a piece of text for a word or pattern and swapping every match for new text. The steps are short.
- Paste or type your text, or upload a .txt file.
- Enter the text to find. Leave "Replace with" empty if you only want to delete it.
- Check the highlighted preview and the count of replacements.
- Copy the result, or click Use result as text to make it the new input.
Example: in The colour of the centre block is blue, finding colour and replacing it with color gives The color of the centre block is blue, with one replacement. The tool matches every occurrence, so a word that appears ten times is replaced ten times. Tick First match only to change just the first one.
Undo steps back through every Use result as text click. To check how the length changed, paste the result into the word counter.
Think of it as a simple text replacer for drafts, lists, code snippets and CSV data.
How do I do a bulk find and replace of many words?
Yes. Switch to "Many replacements (list)" and write one pair per line in the form find => replace. The pairs run from top to bottom, each one on the result of the previous pair, and the tool shows how many matches each pair made. This is a quick way to standardize spelling or swap terms.
A list like this converts British spellings to American:
| List | Input | Result |
|---|---|---|
| colour => color centre => center whilst => while | The colour of the centre, whilst we wait. | The color of the center, while we wait. |
Because pairs run in order, a later pair can match text produced by an earlier one. If you want to swap two words, such as cat and dog, do not use two pairs: the second would undo the first. Use a regular expression with a capture group or a temporary placeholder word instead. The options below the list apply to every pair.
How do case-sensitive and whole-word matching work?
By default the search ignores capital letters, so "apple" also finds "Apple" and "APPLE". Tick Match case to find only the exact capitalization. Tick Whole words only to skip matches inside longer words, so "cat" will not change "concatenate". You can combine both options.
| Options | Input | Result |
|---|---|---|
| Default | Cat cat concatenate | dog dog condogenate |
| Match case | Cat cat concatenate | Cat dog condogenate |
| Whole words only | Cat cat concatenate | dog dog concatenate |
Whole-word matching treats letters, digits, underscores and accented characters as part of a word, so punctuation and spaces mark the edges. The replacement is inserted exactly as typed: replacing cat with dog gives lowercase dog even where the match was Cat, so use Match case when capitalization matters.
How do I do a regex find and replace online?
Tick "Regular expression" and type a pattern in the Find box instead of plain text. For example, [ \t]{2,} finds two or more spaces or tabs in a row, and replacing it with a single space cleans up messy spacing. If the pattern is not valid, the tool tells you instead of failing silently.
A regular expression (regex) is a pattern that can match many different strings. With regex on, ^ and $ match the start and end of each line. The quick-fix buttons under the options show common patterns:
| Goal | Find | Replace with |
|---|---|---|
| Line breaks to spaces | \r?\n+ | one space |
| Collapse extra spaces | [ \t]{2,} | one space |
| Remove blank lines | ^[ \t]*\r?\n | nothing |
| Remove all digits | \d+ | nothing |
If you only need a line break or tab without regex, leave regex off, tick Read \n, \t as line break, tab and type \n in the Find box. Regex runs in your browser with the standard JavaScript engine. A pattern that matches empty text, such as x*, inserts the replacement at every position.
How do I use capture groups in replacements?
Put parentheses around part of your pattern to capture it, then write $1, $2 and so on in the replacement to reuse what each group matched. For example, finding (\w+) (\w+) and replacing with $2, $1 turns "Jane Smith" into "Smith, Jane". $& inserts the whole match and $$ inserts a literal dollar sign.
Groups are numbered by their opening parenthesis, from left to right. Named groups written as (?<year>\d{4}) can be reused with $<year>.
| Find | Replace with | Input | Result |
|---|---|---|---|
| (\w+) (\w+) | $2, $1 | Jane Smith | Smith, Jane |
| (\d{4})-(\d{2})-(\d{2}) | $3/$2/$1 | 2026-10-24 | 24/10/2026 |
| \b(\w+)\b | "$&" | red blue | "red" "blue" |
Capture groups only work with regex on. With plain text, the replacement is inserted literally, so a dollar sign in your text is never treated as a code.
Is my text uploaded anywhere?
No. The find and replace runs entirely in your browser with JavaScript, so your text is never uploaded, sent to a server or stored. Closing or reloading the tab clears everything. Files you upload are read on your own device only, which makes the tool safe for private drafts and data.
The page needs no account and makes no network request with your text. Once it has loaded, you can switch off your connection and it keeps working.
Frequently asked questions
How do I find and replace text online?
Paste your text, type the word to find and the word to replace it with, and the result appears right away with the changes highlighted. Copy it or download it as a .txt file. The tool runs in your browser, so nothing is uploaded.
How do I do multiple find and replace at once?
Open the "Many replacements (list)" tab and write one pair per line as find => replace. The pairs run in order from top to bottom, and the tool reports how many matches each pair made. You can delete text by leaving the replacement empty.
How do I replace line breaks with a space?
Click the Line breaks to spaces quick fix, or tick Regular expression, enter \r?\n+ in Find and a single space in Replace with. Without regex, tick "Read \n, \t as line break, tab" and type \n in Find instead.
What is regex find and replace?
It is find and replace using a pattern instead of fixed text. A pattern like \d+ matches any run of digits, and capture groups let you rearrange matched parts, for example turning 2026-10-24 into 24/10/2026. Turn it on with the Regular expression option.
How do I find and replace in Word or Google Docs?
In Microsoft Word, press Ctrl+H (Cmd+Shift+H on Mac) to open Find and Replace. In Google Docs, press Ctrl+H (Cmd+Shift+H on Mac). Google Docs also offers a regular expression option in the same dialog. This tool is useful for plain text outside those apps.
Can I undo a replacement?
The preview does not change your original text until you click Use result as text. After that, click Undo to restore the previous text, as many times as you need. If you never clicked Use result as text, your original is still untouched in the box.
How can I replace text online free without signing up?
Paste your text, set the options and copy the result. The tool is free, needs no account and runs in your browser, so you can replace text online free of charge and nothing you paste is uploaded.
Is there a limit on text size?
The tool processes up to one million characters, and uploaded files up to 5 MB. A single search stops after 100,000 replacements so the page stays responsive.