What Is Regex Tester & Debugger?
A free online regex tester and debugger. Write patterns with flags (global, case-insensitive, multiline, dotall, unicode, sticky), see live match highlighting, and inspect capture groups with match indices. All in your browser.
Regular expressions are one of the most powerful tools in a developer's arsenal — and one of the hardest to get right. A single misplaced character in a regex pattern can turn a working match into no match, or worse, match everything it should not. Regex Tester & Debugger provides instant feedback as you build your pattern, showing exactly what matches, where the capture groups land, and how each flag affects the result.
Type your pattern into the expression field and toggle any combination of flags: global (g), case-insensitive (i), multiline (m), dotall (s), unicode (u), and sticky (y). The test string area accepts any text, and as you type, matching portions are highlighted in real time. Below the matches, capture groups are displayed individually with their group numbers and matched text, making it easy to see which part of the pattern captured which content.
The tool uses JavaScript's native RegExp engine, so the behavior matches exactly what you will see in Node.js, browser JavaScript, and most modern JS frameworks. This means patterns you develop here work immediately in your code without surprises. The match count and index positions are displayed alongside the results, helping you understand not just what matched but where in the string each match occurred.
For debugging complex patterns, the capture group extraction is particularly valuable. Each group is listed with its group number, making it easy to verify that your capturing groups are capturing the intended content and that non-capturing groups (?:...) are not interfering. The sticky flag (y) behavior is also clearly demonstrated — matches start from the lastIndex position, which is useful for incremental parsing scenarios that are otherwise hard to debug inline.