Regex Tester

Test JavaScript regular expressions against sample text. See matches, indexes, and capture groups instantly in your browser.

Flags
  1. 12 at 6
  2. 345 at 13

Processed locally in your browser.

Advertisement

How to use this regex tester

Enter a pattern, choose flags (g, i, m, s, u, y), and paste test text. Matches and capture groups update as you type.

This uses the JavaScript RegExp engine, the same one in your browser. Patterns from other languages may differ slightly (lookbehind, POSIX classes).

Advertisement

Example

Pattern (\d{3})-(\d{2}) on 123-45 matches 123-45 with groups 123 and 45.

Related tools

More developer tools

  • Unix Timestamp ConverterConvert Unix time (epoch seconds or milliseconds) to local date, UTC, and ISO 8601. Free timestamp and epoch converter.
  • JWT DecoderDecode a JWT header and payload in your browser. Inspect claims without verifying the signature. Free JWT decoder, nothing uploaded.
Advertisement

Frequently asked questions

Which regex flavor is this?

JavaScript (ECMAScript), including the flags your browser supports.

Why did I get an invalid regular expression?

Unclosed groups, dangling quantifiers, or unsupported syntax. The error is from the browser engine.

Does it match all occurrences?

Yes. The global flag is applied so you see every match, not only the first.

Is my test string uploaded?

Processed locally in your browser. We do not upload the text to compute a result.

Last reviewed 2026-08-19. Results stay on your device unless you copy them elsewhere.