Regex Tester

Test JavaScript regular expressions in real time, inspect matches and groups, run multiple cases, and understand syntax—all locally in your browser.

Test cases

FAIL
FAIL

Pattern explanation

JavaScript regex cheatsheet

^ $ anchors · \d \w \s classes · * + ? quantifiers · () captures · | alternatives

100% local — patterns and test data never leave this browser

How to test a regular expression

Use this tester to check JavaScript patterns before you add them to a form, validator, search, or replacement flow. It runs locally and does not send your pattern or sample text to ToolkitLoop.

Write a pattern

Enter the expression without slash delimiters, then choose JavaScript flags such as i or g.

Check real examples

Paste representative text and inspect every match, capture group, and named group.

Try edge cases

Add independent cases with an expected result before using the pattern in your code.

Regex Tester FAQ

How do I test a regex online?

Enter a JavaScript pattern, flags, and test input to inspect matches locally.

How can I test one regex against multiple strings?

Add independent test cases and choose whether each should match.

What do flags mean?

Flags change JavaScript behavior, such as case-insensitive matching with i or global matching with g.

Is my test data private?

Yes. Your pattern and input stay in your browser.

How do I avoid catastrophic backtracking?

Avoid nested ambiguous quantifiers. The tool warns about possible risk but cannot prove a pattern safe.