REGEX EXPLAINER
Break any regular expression into a plain-English, token by token explanation. Nothing leaves your browser.
In short
Paste a regular expression and get a plain-English breakdown of every token — character classes, groups, anchors, and quantifiers. Runs entirely in your browser.
^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$
^matches the start of the string (or line, in multiline mode)[A-Za-z0-9._%+-]+matches any character in the set [A-Za-z0-9._%+-], repeated one or more times@matches the literal text "@"[A-Za-z0-9.-]+matches any character in the set [A-Za-z0-9.-], repeated one or more times\.matches an escaped literal "."[A-Za-z]matches any character in the set [A-Za-z]{matches the literal text "{"2,matches the literal text "2,"}matches the literal text "}"$matches the end of the string (or line, in multiline mode)Aj+%S@ub-df.UMgE@xSM.WeTNskyM@dx-PwJ.VMHlIRDp6@-t.Pjxw93.HC@S4g7tKr.GyIUGUQi
How to use the regex explainer
- 1
Paste a regular expression pattern.
- 2
The explainer breaks it into tokens — literals, character classes, groups, anchors, and quantifiers.
- 3
Read each token's plain-English meaning, in the order it appears in the pattern.
- 4
Adjust the pattern and watch the explanation update instantly.
Questions
- What regex syntax does this understand?
- Standard JavaScript regex syntax: character classes (\d, \w, \s and their negations), the wildcard (.), anchors (^ and $), character sets ([a-z]), capturing/non-capturing/named groups, lookaheads and lookbehinds, alternation (|), and quantifiers (*, +, ?, {n,m}, including lazy variants).
- How are quantifiers attached to their explanation?
- A quantifier always applies to whatever came immediately before it, so the explainer folds it into the previous token's description — for example \d+ is shown as one entry: "matches any digit, repeated one or more times" — instead of two separate unexplained pieces.
- Why does it also validate the pattern?
- Before explaining anything, the pattern is compiled as a real JavaScript RegExp — if it's invalid, you get the browser's own syntax error instead of a confusing or wrong breakdown.
- Is my regex sent anywhere?
- No. Everything runs locally in your browser with JavaScript — nothing is transmitted or stored.
Related tools
- Regex Escape ToolEscape special characters so text matches literally in a regex, for JavaScript, Python, PCRE, or POSIX, or unescape it back.
- CSS Selector TesterTest a CSS selector against pasted HTML: see matched elements, the match count, and the selector's specificity.
- Regex TesterTest a regex against a string with live match highlighting.
- Cron Expression GeneratorBuild cron schedules visually or from presets, copy the expression, and preview the next 5 run times in your local timezone.
- Curl Command ExplainerPaste a curl command and see every flag explained in plain English, with the derived method, URL, and header count.
- JSON to TypeScript ConverterPaste JSON and get matching TypeScript interfaces, with nested objects turned into their own named interfaces.
- User-Agent ParserDecode a User-Agent string into browser, version, operating system, device type, and rendering engine.
- Email ValidatorCheck an email address's format, see its local part and domain, and catch common typo domains like gmial.com.
Updated