Regex Tester

Test regular expressions against sample text with live highlighting.

/
Try it now — this pattern and text are already filled in below as a working example. Just edit them to test your own.

    

How to use this free online regex tester

Enter a regular expression pattern and flags (like g for global match or i for case-insensitive matching), then type or paste your test string. Every match is highlighted directly in the text as you type, powered by your browser's native JavaScript regex engine — no server round-trip, and nothing you type ever leaves your device.

This regex tester is useful for validating email patterns, phone numbers, URLs, log lines, form input rules, and any other text-matching logic before you drop it into your code. If your pattern has a syntax error, you'll see the exact error message instantly instead of a silent failure.