Regex Replacer

Replace text with JavaScript regex patterns and capture references.

Regex Replacer
Local input
Output
Processing…
About this tool

Made for the task at hand.

Apply JavaScript replacement syntax to text while keeping the pattern, replacement, and source content on separate lines.

How to use

  1. Enter the pattern on line one and replacement on line two.
  2. Add source text below and choose regex flags.
  3. Copy the fully replaced text from the output.
Your work stays yours.
Tool inputs are processed locally in your browser and are never sent to KitVerse servers. Clear the workspace when using a shared device.
Common questions
How do I reference captured text?

Use JavaScript replacement tokens such as $1 for numbered groups and $<name> for named groups.

Can the replacement be empty?

Yes. Leave line two empty to delete matches while keeping source text on line three onward.