Regex Tester

Test JavaScript regular expressions with local match highlighting, flags and capture group output. Everything runs locally in your browser.

/ /gi
Regex flags
Ready

Highlighted matches

Capture groups

Match Index Full match Groups
Capture groups appear after you test a pattern.

JavaScript RegExp behavior

The tester uses the same browser RegExp engine your frontend JavaScript uses, so flags and syntax match real client-side code.

Capture group inspection

Review numbered groups, named groups and match positions without stepping through code or opening a console.

Private browser utility

Everything runs locally in your browser. Sensitive logs, tokens and sample payloads are not uploaded.

Related developer tools

Frequently Asked Questions

Is my regex or test text uploaded?

No. Everything runs locally in your browser with the JavaScript RegExp engine. Your pattern and text are not sent to Convertr servers.

Which regex flavor does this tester use?

This page uses JavaScript regular expressions, the same RegExp behavior used by modern browsers and Node.js.

Can I inspect capture groups?

Yes. The results table lists each match, numbered capture groups and named capture groups when your browser provides them.

Which flags are supported?

The tester supports common JavaScript flags including g, i, m, s, u, y and d when available in your browser.

Regex Tester

Test JavaScript regular expressions with flags, match highlighting, and capture-group output.

Input
A JavaScript regular expression, flags, and test text.
Output
Matches, indices, captures, and highlighted source text.
Real limitations
JavaScript regex syntax differs from PCRE, RE2, .NET, and other engines; catastrophic patterns can still freeze a browser tab.
Privacy and data handling
a JavaScript regular expression, flags, and test text is processed in this browser tab. Convertr does not receive or store it; closing or reloading the page clears the working state unless the tool explicitly offers a local download.

How to use this tool

  1. Provide a JavaScript regular expression, flags, and test text in the tool controls.
  2. Choose the settings that affect matches, indices, captures, and highlighted source text, then run the tool.
  3. Review matches, indices, captures, and highlighted source text before copying or downloading it.

Common failure modes

Invalid syntax, duplicate flags, zero-length global matches, or an expensive pattern can produce an error or slow evaluation.

Useful example

Test /order-(\d+)/g against log lines to list each captured order number.