Developer Tools

Regex Explainer

Break a regular expression down into a readable, indented tree.

Loading interactive tool...

About this tool

Paste any ECMAScript regex and see a token-by-token explanation — character classes, quantifiers, capturing/non-capturing groups, lookarounds, alternation, anchors, and shorthand classes — with proper nesting under groups.

Frequently asked questions

Which features are supported?

Capturing/non-capturing/named groups, lookahead and lookbehind (positive and negative), character classes, quantifiers (greedy and lazy), shorthand classes (\d, \w, \s and friends), anchors, escapes, and alternation.

Will this catch syntax errors?

Use the Regex Tester for compilation errors — the explainer is forgiving and surfaces tokens even when the regex doesn't compile.

Related tools