About Find and Replace
A bulk replace is only as good as your confidence in what it will change. Replacing cat also rewrites category, unless you notice in time. So the tool shows you first: as you type, the match count updates and each match is highlighted in your text, with the old text struck through and the new text beside it. Your original stays untouched in the left box.
For plain edits, type the two pieces of text. Match case and Whole words narrow things down, and the search works across accents and other scripts. For patterns, turn on Regex, and groups let you reshape text, turning 2026-03-14 into 14/03/2026 throughout a document.
When a pattern is wrong, the error says what is wrong and what to do: a [ with no closing ], for example, and how to search for the bracket itself. Your text stays as it is until the pattern is fixed.
How it works
Plain searches escape every special character, so a.b finds exactly that and a $ in the replacement is an ordinary dollar sign. Searching is case-insensitive unless you turn on Match case. Whole words uses Unicode-aware boundaries, so it also works on été and not only on English letters, which the classic \b does not manage.
Regex mode uses JavaScript regular expressions with the global and multiline flags, so ^ and $ match at each line. Unicode mode is on where the pattern allows it, so . treats an emoji as one character and \p{L} matches any letter. If a pattern uses loose escapes that are illegal in that mode, such as \-, the tool falls back rather than rejecting it. Replacements understand $1, $<name> and $&, plus \n and \t, which a single-line box could not otherwise produce.
Regular expressions can take far longer than expected. A nested repeat like (a+)+ can run almost forever on the wrong text, and in most tools that freezes the tab. Here regex searches run in a background worker and are stopped after 2 seconds, with a message explaining why, and the page stays usable.
How to use Find and Replace
- Paste your text into the Your text box, or press Try an example to load sample text and a search.
- Type in Find. The count and the highlights update as you type. Press Enter in Find to step through the matches, or use Prev and Next.
- Type in Replace with, or leave it empty to delete the matches.
- Turn on Match case, Whole words or Regex as needed.
- Switch to Final text to read the result without the markup.
- Press Copy result, or Ctrl or Cmd + Enter. Download saves the text as replaced-text.txt.
Reformat dates with a regex
Order 1042 shipped on 2026-03-14.
Order 1043 shipped on 2026-03-15.
Find: (\d{4})-(\d{2})-(\d{2})
Replace with: $3/$2/$1Order 1042 shipped on 14/03/2026.
Order 1043 shipped on 15/03/2026.The count reads 2 matches before you copy anything. Each set of parentheses captures one part of the date, and $3/$2/$1 writes them back in a new order. An unclosed pattern such as [abc shows: This pattern cannot run. A [ has no closing ].
When it helps
- Updating a product name across a long document, checking each change in the preview first.
- Deleting tracking parameters from a pasted list of URLs with a regex.
- Swapping curly quotes for straight ones before sending a text message.
- Turning a comma-separated line into one item per line, by replacing
,with\nin Regex mode. - Testing a pattern on real text before putting it in a script.
Tips for a better result
- Use Whole words whenever the search term could sit inside a longer word.
- To add something to the start of every line, turn on Regex, search for
^and type your text in Replace with. Use$to add it to the end of every line. - To delete a whole line containing a word, search
^.*word.*\nwith Regex on and leave Replace with empty. - For a deep look at what each group captured, use the Regex Tester. It suits building a pattern, while this tool suits applying one.
Good to know
- The patterns are JavaScript regular expressions, so features from other flavors, such as inline flags like
(?i), are rejected. Possessive quantifiers are also unavailable. - It holds one find and replace at a time. For a chain, copy the result into the box and run the next one.
- The preview shows up to the first 2,000 matches and about 300,000 characters. The count, Final text, Copy and Download always cover everything.
- A search that takes longer than 2 seconds is stopped, which can catch a reasonable pattern on a very large text. Search a smaller piece, or make the pattern more specific.
Questions people ask
How do I use a captured group in the replacement?
Put parentheses around the part you want in Find, then refer to it as $1 in Replace with. A second set of parentheses is $2, and so on. $& writes back the entire match, so replacing \d+ with [$&] puts brackets around every number.
How do I replace a line break?
Turn on Regex, then use \n. Searching for \n and replacing with a space joins all the lines into one. Replacing , with \n splits a comma-separated list into separate lines.
Why does my pattern work elsewhere but show an error here?
Regular expressions come in flavors. This tool uses the JavaScript flavor, so a pattern written for PCRE or Python may use syntax it does not accept. The error message points to what it rejected, and (?i) is the most common case. Use the Match case checkbox instead.
Can I undo a replacement?
There is nothing to undo, because your text in the left box never changes. The result is a separate copy, so you can change the search as often as you like, or clear it to get back to where you started.
What to use next
- Regex Tester: to build a pattern and inspect each captured group.
- Case Converter: when the change you need is capitalization and not specific words.
- Remove Empty Lines: to clear out the blank lines a replacement can leave behind.
Learn more
Last reviewed . Read our editorial policy.