What does this tool do?
| Direct answer | Regex Replace substitutes every match with your replacement, supporting $1, $&, $' references. |
| Key fact | $& inserts the whole match; $1…$9 insert capture groups. |
| Processing | Runs locally in your browser; no data is sent to a server. |
How to use
- Enter the pattern and flags.
- Enter the replacement ($1, $& supported).
- Click Replace matches.
Example
Input
Order 42 shipped
Output
Order [42] shipped (pattern \d+, replacement [$&])
Who is this for?
This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.
Writers cleaning up drafts, developers batch-fixing text, translators, and students. Paste, transform, copy — no signup, no limits.
Frequently asked questions
How do I use capture groups?
Wrap parts in ( ) and refer to them as $1, $2 in the replacement.
What flag replaces all matches?
g — it is added automatically if missing.
Can I use lookbehind?
Yes in modern browsers; very old Safari may not support it.