← Free online tools

Developer tool

Regex Tester

Test JavaScript regular expressions with live highlights, capture groups, replacement preview, quick examples, validation errors, and copy-ready output.

Runs locally

Your pattern and sample text stay in the browser. Nothing is uploaded for matching.

//g
Flags:

g = all matches, i = ignore case, m = ^/$ per line, s = . matches newlines, u = Unicode mode, y = sticky (match only at the start).

Quick patterns:
Match Results (0 matches)

Enter a pattern to see results.

Examples

Start from email, URL, phone, IPv4, or ISO date presets.

Capture groups

Inspect group values and match indexes for each result.

Replace preview

Test substitutions before using a pattern in production code.

FAQ

Which regex engine does this use?

It uses JavaScript RegExp in the browser, so behavior matches modern JavaScript regular expressions.

Can I test replacements?

Yes. Turn on Replace and use JavaScript replacement tokens: $1 and $2 for numbered groups, $<name> for named groups, and $& for the whole match. An empty replacement deletes the matches.

What happens if my pattern is too slow?

Matching runs in a background worker. If it takes longer than 2 seconds, usually because of catastrophic backtracking such as (a+)+$, it is stopped and a warning is shown instead of freezing the page.

Can I copy the output?

Yes. The tester includes copy actions for the current pattern and match summary.

Is my text uploaded?

No. Pattern validation, matching, replacement, and copy actions run locally in your browser.

Related Tools

loresync tools publishes 160 free online tools.