Regex Tester

Test JavaScript regular expressions against text directly in your browser with match highlighting, capture groups and common regex flags.

Flags
Test text 0 bytes
Match preview 0 matches
Matched text will be highlighted here.
Ready
Enter a pattern and test text

Testing happens locally in your browser. Input is limited to 2 MB.

Browser-localYour pattern and test text stay on your device. Only non-content byte counts and timing may be recorded.
JavaScript regex enginePatterns use the regular-expression syntax supported by your browser's JavaScript engine.
Capture groupsEach match shows its start/end index plus numbered and named capture groups when present.

Common flags

Use global, case-insensitive, multiline, dot-all, Unicode and sticky matching without adding flags to the pattern itself.

Safe highlighting

Matched output is rendered as text with highlights, so HTML in your test input is not executed by the preview.

Zero-width matches

Empty matches are handled safely so patterns such as anchors and lookarounds cannot lock the browser in an infinite loop.