Find and Replace Text Online
This online find and replace tool changes every copy of a word, phrase or pattern in your text at once. Paste the text, type what to find and what to put in its place, and copy the result. Options for match case, whole words and regular expressions give you the same control as a code editor.
Everything runs in your browser. Nothing you enter is sent to or stored on our server.
Quick answer: Paste your text, type the word to find and its replacement. The result box updates instantly and the counter shows how many matches were replaced. Click Copy result to use it.
How to use find and replace
- Paste your text into the top box. A sample sentence is loaded to start.
- Type the word or phrase in Find and the new text in Replace with. Leave Replace empty to delete every match.
- Tick Match case to replace “Color” but not “color”, and Whole words only so “cat” does not change “category”.
- Click Use result as input to chain several replacements, then copy the final text.
Using regular expressions
Tick Regular expression to search for patterns instead of fixed text. The tool uses JavaScript regex syntax.
| Find | Replace | What it does |
|---|---|---|
\s+ | (a space) | Turns runs of spaces, tabs and line breaks into one space. |
^ | - | Adds “- ” to the start of the text (use with line patterns for lists). |
(\w+)@(\w+) | $2 at $1 | Swaps captured groups. $1, $2 refer to the brackets. |
\d{3}-\d{4} | XXX-XXXX | Masks numbers in a 555-1234 pattern. |
\n\n+ | \n | Removes blank lines. Type \n in Replace for a new line. |
Test and debug a pattern with live highlighting in the regex tester.
Find and replace in Word, Google Docs and code editors
The shortcut is Ctrl+H on Windows in Word, Google Docs, Notepad and VS Code, and Cmd+Shift+H in Google Docs on a Mac (Cmd+Option+F in many Mac editors). This page helps when you are working with text from a form, an email, a CMS or a phone, or when you need regex in a place that does not support it.
For other bulk edits, see case converter, remove duplicate lines and remove blank lines.
FAQ
Can I replace with nothing?
Yes. Leave the Replace box empty and every match is deleted.
Can I replace line breaks?
Turn on Regular expression, then use \n in Find or Replace for a line break and \t for a tab.
Is my text private?
Yes. All replacing happens in your browser and nothing is uploaded.
More free tools
See all of them on the QuickOnlineTips free online tools page and play our free online games.
