How to test regex online
- Enter your pattern without surrounding slashes.
- Choose flags such as
g,iorm. - Paste test text and inspect highlighted matches.
- Open match details to verify capture groups.
Test JavaScript regular expressions online for free and see every match, capture group and replacement update as you type.
🔒 Everything runs locally. Your pattern and text never leave this browser.
g, i or m.\d digit · \w word character · . any character · + one or more · * zero or more · ? optional · ^ start · $ end · ( ) capture group.
This online regex tester uses your browser’s JavaScript regex engine, so supported features depend on your browser.
Quick answers about the JavaScript regex engine, flags, capture groups and privacy.
It uses the JavaScript regular expression engine built into your browser.
Enter a pattern without surrounding slashes, select any flags, paste test text and inspect the highlighted matches and capture groups.
You can type any flag supported by your browser, including g, i, m, s, u, y and d where available.
Yes. Enter replacement text to preview numbered groups such as $1, named groups such as $<name>, or the full match with $&.
No. Your pattern, test text and replacement stay in your browser.
Keep working with data and developer-friendly text utilities.