Skip to content
Zesona
Regex Replacement TesterLocal

Regex Replacement Tester

Preview a regular expression replacement, with every match listed so you can check it before running it for real.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

amp; is the whole match, $1 the first group,
lt;name> a named group, $ a literal dollar.

0 characters

Processed entirely in your browser. Nothing is uploaded.

Fill in Pattern and Test string to continue.

Enter your input to see the result

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Enter the pattern, the replacement and the text.

  2. 2

    The result appears with every match listed beneath it, so you can confirm the replacement before applying it to real data.

Questions about Regex Replacement Tester

How do I insert a captured group?

`$1` for the first group, `$2` for the second, `

lt;name>` for a named group, and `
amp;` for the whole match. A literal dollar sign is `$`. Note that `\1` works in a *pattern* as a back-reference but not in a replacement.

Is my data sent anywhere?

No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.

Does the Regex Replacement Tester work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Regex Replacement Tester keeps working with the network switched off and nothing is ever sent to a server.

Is anything I enter into the Regex Replacement Tester uploaded or stored?

No. The Regex Replacement Tester runs in your browser, so whatever you type or paste never leaves your device — there is no server round-trip, nothing is logged, and there is nothing to delete afterwards.

Can I use the Regex Replacement Tester on a phone or tablet?

Yes. The page is responsive, so the Regex Replacement Tester works the same in a mobile browser as on a desktop, and there is no app to install.

Other tools you might reach for next.

Test a regular expression against a subject, with every match, its position, and its numbered and named capture groups.