How to find and replace text online
- Paste your text into the Text box.
- Enter what to find and what to replace it with.
- Turn on Match case, Whole word or Regex as needed; the match count and preview update instantly.
- Click Replace all in text to apply the change, Undo to step back, or Copy result.
What you can do with Find & Replace
- Live match highlighting
- Every match is highlighted in the Matches panel and a counter shows how many were found before you change anything.
- Result preview
- A second panel shows the text after replacement, with each substituted value highlighted, so mistakes are caught before you apply them.
- Regular expressions
- Switch on Regex for JavaScript patterns with multiline, dot-all and Unicode flags, plus $1 and $<name> group references in the replacement.
- Whole word and case options
- Whole word avoids replacing cat inside category, and Match case keeps Apple and apple separate.
- Line breaks and tabs
- In regex mode, type \n or \t in the replacement to insert new lines or tabs, which is handy for reformatting lists.
- Multi-step undo
- Each Replace all can be undone step by step, so you can chain several replacements safely and back out of any of them.
Plain search vs regex find and replace
A browser-based find and replace is useful when your text isn't in an editor that has one, or when you need regex power without installing anything: cleaning exported data, swapping a product name across a long article, changing a date format, or removing tracking parameters from a list of links. Plain mode matches your search literally, so symbols like a dot or a question mark need no escaping. Whole word wraps the search in word boundaries, and matching ignores case unless you tick Match case.
Regex mode follows JavaScript syntax. A few patterns cover most jobs: \s+ matches any run of whitespace, and ^ and $ match the start and end of each line when Multiline is on. Searching for (\d{2})/(\d{2})/(\d{4}) and replacing with $3-$1-$2 turns 03/14/2025 into 2025-03-14. To join lines, find \n and replace it with a comma and a space. Use $& to insert the whole match, for example to wrap every match in quotes.
Frequently asked questions
Is my text uploaded when I use find and replace?
No. Searching and replacing happen entirely in your browser with JavaScript's built-in regular expression engine. Your text isn't sent to a server or stored, so it's safe to use with documents, code and customer data.
How do I replace line breaks?
Turn on Regex, enter \n in Find and type your replacement, such as a comma and a space, to join lines. To do the reverse, find a character like a comma and put \n in Replace with to split the text onto separate lines.
What regex flavor is supported?
It uses JavaScript regular expressions, the same as in browsers and Node.js. That includes lookahead, lookbehind, named groups and Unicode property escapes like \p{L} when the Unicode flag is on. Invalid patterns show an error message instead of a result.
Can I undo a replacement?
Yes. Every time you click Replace all in text, the previous version is saved. Click Undo to go back one step at a time. The history only lives in the page, so it is cleared when you leave or refresh.
Does Whole word work with accented or non-English words?
Whole word uses the regex \b boundary, which only treats A to Z, digits and underscore as word characters. For accented or non-Latin words, turn on Regex and Unicode and use a pattern such as (?<!\p{L})word(?!\p{L}) instead.