Multitool

Regex Tester

Write a JavaScript regular expression and see matches, capture groups and replacements update live.

About the Regex Tester

Build a JavaScript regular expression and watch every match highlight in your test string as you type. Each match lists its position, numbered capture groups and named groups. Toggle the g, i, m, s and u flags individually, and fill in the replace field to preview the substituted text before it goes into code.

Tip: Start from one of the preset chips for email, URL, HEX colour, date or named groups, then edit it. Changing a working pattern is quicker than writing one from scratch, and the match list shows right away what you broke.

Regex Tester is free, needs no sign-up and runs entirely in your browser, so what you paste never leaves your device.

How to use it

  1. Set the options with the controls; there is no text to paste for this tool.
  2. Adjust the options. The result updates instantly.
  3. Copy the output with the Copy button or Ctrl+C.

Topics

  • regex
  • regular
  • expression
  • match
  • test
  • replace
  • groups

Frequently asked questions

Is the Regex Tester free to use?

Yes. The Regex Tester is completely free, needs no account and has no usage limits.

Is my data uploaded when I use the Regex Tester?

No. Everything is processed locally in your browser, so what you paste never leaves your device. The last 3 snippets are kept on this device only and you can clear them with one click.

How do I use the Regex Tester?

Set the options with the controls; there is no text to paste for this tool. Results update instantly, then copy them with the Copy button or Ctrl+C.

More developer tools