Regex Tester
Test JavaScript regular expressions against any text: see every match, its position, and capture groups — entirely in your browser.
What this regex tester does
Tests a regular expression against your text and lists every match, its position, and any capture groups. Type the pattern and flags, paste your text, and see exactly what matches.
The g flag matters
Without the g (global) flag you get only the first match. Add i for case-insensitive, m for multiline, and s to make the dot match newlines. This tester respects the flags exactly as JavaScript does.
Frequently asked questions
How does the regex tester work?
Enter a pattern and flags, paste your text, and it lists every match with its index and capture groups — exactly as JavaScript evaluates the expression.
Why is the g flag important?
Without the global flag you only get the first match. Add i for case-insensitive matching, m for multiline, and s to let the dot match newlines.
Is the test run locally?
Yes. Matching runs entirely in your browser.
Does Regex Tester upload my data?
No. Regex Tester runs entirely in your browser — your input never leaves this page.
Is Regex Tester free to use?
Yes. Regex Tester is completely free, with no account and nothing to sign up for.