Regex Tester
Write, test and debug regular expressions in real time β free and instant.
What is it?
Regex Tester is a free browser-based tool for writing and testing JavaScript regular expressions. Type your pattern and test string, and all matches are highlighted instantly with color-coded capture groups. Supports all standard flags (global, case-insensitive, multiline, dotAll) and shows you match details including index positions and group values β no external libraries, no server calls.
How to use it
- Enter your regular expression pattern in the "Pattern" field (without slashes).
- Select any flags you need: g (global), i (case insensitive), m (multiline), s (dotAll).
- Type or paste your test string in the large text area.
- Matches are highlighted in real time β yellow for full matches, colored for capture groups.
- Scroll the match list below to see each match's index, value, and captured groups.
Why use this tool
Regex Tester gives you instant visual feedback as you type β no need to run code or refresh the page. Capture groups are color-coded so you can debug complex patterns at a glance. Unlike copy-pasting into a console, everything stays in one place. Perfect for developers, data analysts, and anyone working with pattern matching in JavaScript, Node.js, or browser environments.
Frequently asked questions
Which regex engine does this use?
It uses the native JavaScript RegExp engine built into your browser, so results match exactly what you'd get in a JS application.
How many capture groups are supported?
Up to 9 capture groups are color-coded. Patterns with more groups still work β additional groups are shown in the match details.
What does the "s" (dotAll) flag do?
It makes the dot "." match newline characters as well, useful for patterns that span multiple lines.
Can I test named capture groups?
Yes. Named capture groups ((?<name>...)) are fully supported and their names appear in the match details panel.
Is my data sent to a server?
No. All matching runs entirely in your browser. No data is ever uploaded or stored.