Regex Explainer

Paste any regex and get a token-by-token plain-English explanation: what each character class matches, what each group captures, what the quantifiers do, where the anchors are. Useful when reading regex you didn't write or debugging why a pattern doesn't match.

How to use the Regex Explainer

Paste your regex (without the slashes). The explainer walks the pattern from left to right, identifying each construct: character classes (\d, \w), groups, alternations, quantifiers, anchors, lookarounds, escapes. Each row is annotated with a plain-English description.

Why regex is hard to read

Regex is a write-only language for most developers. The pattern ^(?:[A-Z][a-z]+)(?:\s+(?:[A-Z][a-z]+))*$ takes a minute to figure out for anyone who didn't write it yesterday. The explainer reduces that to a glance — token, what it does, why.

This is most useful when: reading regex in a code review, debugging a regex pulled from a library, learning regex by example (start from the explanation and work backward to the pattern), or maintaining a regex written months ago.

Frequently asked questions

What does it explain?

Every token in the pattern: character classes, groups and what they capture, quantifiers, anchors and lookarounds, each described in plain English.

Which regex flavor does it assume?

It targets common PCRE and JavaScript syntax. Some exotic constructs differ between engines, so verify against your target language for edge cases.

Is my regex sent anywhere?

No. The breakdown is generated in your browser, so your pattern and any test text stay local.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: