Regex Find and Replace
Replace text that matches a JavaScript regular expression.
Runs on your device. Nothing you add is uploaded.
How to use Regex Find and Replace
- Paste the text to edit.
- Enter a JavaScript pattern, flags, and replacement.
- Copy the updated text.
Questions
Can the replacement refer to the matched text?
Yes. Use $& for the full match or $1 for the first numbered capture. Use g to replace every match.
Where is my input processed?
On your device. The tool does not upload the input or its result.
How this works
Runs JavaScript replacement in a time-limited worker.
Everything happens in this browser tab. What you type or add stays on your device, and the page has no tracking. Your last settings are kept in this browser so the tool opens the way you left it. Privacy
Related tools
More in TextFind and Replace
Replace matching words or phrases throughout a passage.
Regex Tester
Test a JavaScript regular expression and see the matching text and captured groups.
Text Diff Checker
Compare two versions of text and highlight additions and removals.
Word Counter
Count words, characters, and sentences as you write.