Find & Replace
Find and replace text with plain or regex patterns.
Type or paste text above, fill in Find and Replace, then click Replace.
Why use a find and replace tool?
Text editors and IDEs have built-in find-and-replace, but they are tied to a file. When you need to transform pasted text, process content from a web form, or apply a regex to a log snippet, a browser tool is faster. Regex mode is especially powerful — you can rename variables across a snippet, reformat dates, extract specific patterns, or strip HTML tags with a single expression. The match count gives immediate feedback on whether your pattern is correct.
How to use
Paste your text in the input box. Enter the search string in the Find field and the replacement in the Replace with field. Use the checkboxes to enable Regex mode (supports full JavaScript regex syntax), make the search Case-sensitive, replace all occurrences (Global), or make ^ and $ match line boundaries (Multiline). Click Replace to apply. The output shows the transformed text. Click Copy to put the result in your clipboard.
Frequently Asked Questions
- How do I use capture groups in the replacement?
- In regex mode, use $1, $2, etc. in the Replace field to reference captured groups. For example, with Find pattern (\w+)\s(\w+) and Replace $2 $1, the text "hello world" becomes "world hello".
- What does the Global option do?
- When Global is enabled, all occurrences of the search pattern are replaced. When disabled, only the first occurrence is replaced. This matches the difference between the "g" flag and no flag in JavaScript regex.
- Does the tool support multiline regex?
- Yes. Enable the Multiline option to make ^ and $ match the start and end of each line rather than the whole string. Combine with the Dot-all option if you need . to match newlines as well.