Developer · free local utility

JavaScript Regex Tester

Compile a JavaScript pattern against sample text and inspect match indexes, capture groups, and named groups.

Use the tool

Enter the pattern without surrounding slashes, choose JavaScript flags, and paste the text to test.

How it works

Get a useful result in three steps

  1. Enter a JavaScript regex pattern and flags.
  2. Paste or type representative test text.
  3. Run the expression and inspect match positions and groups.
Accuracy boundary

A focused tool, not an automatic expert

The syntax follows the JavaScript engine in your browser. It is not a PCRE, RE2, Python, or .NET compatibility checker.

Always verify the result in the system where you will use it. The page intentionally avoids accounts, uploads, and claims that go beyond the calculation it performs.

Questions

Before you use the result

Should I include / characters around the pattern?

No. Enter only the pattern body. Flags go in the separate flags field.

Which flags are accepted?

The tool accepts JavaScript flags supported by modern browsers, including d, g, i, m, s, u, v, and y.

Can an empty-match regex freeze the page?

The runner advances after an empty match and limits output to 200 matches to avoid an infinite result loop.

Related tools

Continue the task locally