Regex Tester \u2014 Test Regular Expressions Online Free
Test a regular expression against your text and see every match highlighted live, with its position and captured groups. Use the presets for common patterns, or write your own.
Highlighted matches
No matches yet — enter a pattern above, or try a preset.
Private: your pattern and test text are checked in your browser only — nothing is uploaded to any server.
Careful: very complex patterns (for example nested quantifiers like (a+)+) can freeze your browser tab. Keep patterns simple, and test on short text first.
Private by design: your files and text are processed in your browser on your own device. Nothing is uploaded to a server, no sign-up is needed, and there is no watermark.
About this tool
Regular expressions are the pattern language for finding and validating text — email addresses, phone numbers, CNIC formats, or every word starting with a capital letter. This tester runs your pattern live with match highlighting, a match list and captured groups, plus common presets to start from. It is the fastest way to check a pattern before putting it in your code.
How to use the regex tester
- Type your pattern, or tap a preset such as Email or URL.
- Tick the flags you need — g for all matches, i to ignore case.
- Paste your test text and watch matches highlight live.
- Check the match list for each match's index and captured groups.
Frequently Asked Questions
Is the regex tester free?
Yes, completely free with no sign-up and no limits. Type a pattern, paste some test text, and matches are highlighted live as you type.
Is my pattern and test text private?
Yes. Everything is tested in your browser on your own device using JavaScript's built-in RegExp engine. Nothing is uploaded, stored or shared.
What do the flags mean?
g (global) finds all matches instead of just the first. i ignores upper/lower case. m makes ^ and $ match the start and end of each line. s lets . match line breaks too. u turns on full Unicode mode.
What are the presets for?
The preset buttons fill in a ready-made pattern for common jobs — email addresses, URLs, phone numbers, dates in YYYY-MM-DD format, and numbers. Pick one and adjust it to your needs; your last preset is remembered.
Can a regex freeze my browser?
Yes, honestly it can. Very complex patterns with nested quantifiers — for example (a+)+ on long text — can cause catastrophic backtracking and freeze the tab. Keep patterns simple, test on short text first, and avoid nested + and * where you can.
Does it show captured groups?
Yes. The match list under the highlighted text shows every match with its position (index) and the text captured by each (...) group in your pattern.