Regex Tester
Test JavaScript regular expressions, inspect capture groups, and highlight matches without leaving your browser.
What does this tool do?
A regex tester shows where a pattern matches your sample text and what its capture groups contain. This tool uses your browser's JavaScript regular expression engine.
When to use this tool
Try a regular expression against sample text before using it in JavaScript. Match highlighting and capture groups help explain what the pattern selects. Choose flags deliberately: a pattern tested in another language may behave differently in your browser's JavaScript engine.
How to use Regex Tester
- Enter a JavaScript regex without surrounding slashes.
- Choose flags and add your test text.
- Run the pattern to inspect highlighted matches and capture groups.
A quick example
Pattern: \b\w+@\w+\.\w+\b Text: hello@example.com Match: hello@example.com
Common questions
Which regex flavor is supported?
This tool uses the JavaScript RegExp engine in your browser. Syntax may differ from Python, PCRE, or .NET.
What happens with zero-length matches?
They are listed with their positions, and the engine advances safely to avoid an infinite loop. Results are capped at 1,000 matches.
Working with a large input? Text converters accept up to 1,000,000 characters. Regex test text is limited to 50,000 characters and JWTs to 100,000.