Regex Tester
Test regular expressions live with match highlighting and capture groups. Free, private and instant.
How to use the Regex Tester
- Type a JavaScript regular expression without the surrounding slashes, then set the flags (g for all matches, i to ignore case).
- Paste the test string. Matches are highlighted and listed with their position and capture groups.
- Change the pattern and the results update as you type.
Example
Worked example (fictional emails, run through this tool)
- Pattern and flags: (\w+)@(\w+)\.com with gi
- Test string: Contact ada@example.com or linus@kernel.com today.
- Result: 2 matches: ada@example.com at index 8 (groups ada, example) and linus@kernel.com at index 27
- Named groups: (?<year>[0-9]{4})-(?<m>[0-9]{2}) on "On 2026-10 and 2027-01" finds 2026-10 and 2027-01
- Bad pattern: ( gives: Invalid regular expression: Unterminated group
Limitations
- JavaScript syntax only. Python, PCRE and grep patterns can differ, for example in lookbehind and named group syntax.
- Empty matches are skipped, and at most 500 matches are listed.
- Without the g flag only the first match is found.
- A badly written pattern can be very slow on long text.
About this tool
Write a JavaScript regular expression and see every match highlighted in your test string, along with numbered and named capture groups.
Regex Tester is part of ToolStack Hub's Developer Tools. It runs entirely in your browser, which keeps your data private and makes results instant. There is nothing to install and no account to create. There is no usage limit.
Guides about this tool
Frequently asked questions
Is the Regex Tester free?
Yes. Regex Tester is completely free with no sign-up, limits or watermarks.
Is my data private when I use the Regex Tester?
Yes. It runs in your browser, so your input is not uploaded to our servers.
Does it work on mobile?
Yes. ToolStack Hub tools work on phones, tablets and desktop browsers.
Keep going
Need this automated for your business?
Vantalume builds custom AI and web automation workflows so your team can stop doing repetitive work.