Regex Explainer
Paste a regular expression and get a token-by-token breakdown: each literal, character class, escape, group, quantifier and anchor is explained in plain English in a table. Capturing vs non-capturing vs lookaround groups are told apart, quantifiers say exactly how many repetitions they require (and whether they are lazy), and every flag is decoded. Works on your device, so nothing is sent anywhere.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What the breakdown gives you
Paste a regular expression and the tool walks it character by character and returns a table: each token on one side, a plain-English explanation of what that token matches on the other. A literal is described as the character it matches, a character class as the set it allows, an escape as what it stands for, and so on. Groups, quantifiers and anchors each get their own row, so a dense pattern reads as a sequence of small, named pieces.
Reading a pattern you inherited
The obvious use is a regex someone else wrote that you now have to maintain — a validation pattern copied from a library, or a routing rule whose parentheses and question marks have lost all meaning. It is also a practical way to learn: write a small pattern, see how the tool names each part, and the syntax stops feeling like punctuation soup.
Groups, quantifiers and flags
Capturing groups, non-capturing groups, named groups and lookarounds are told apart rather than lumped together, because they change what a pattern returns and whether it consumes text. Quantifiers state exactly how many repetitions they require and whether they are lazy — {3,16} is spelled out, and an asterisk is described as zero or more rather than just "any". Whatever letters you put in the flags field (g, i, m, s, u, y, d, v) are decoded so the explanation of anchors, the dot and case sensitivity matches how the pattern will actually run.
What it does not do
It explains, it does not execute: no test string is matched against the pattern, so it will not tell you whether your expression matches the text you have in mind — use a regex tester for that. It flags unknown escapes and unbalanced groups, but a pattern can be syntactically fine and still not mean what you intended. The syntax explained is the JavaScript/ECMAScript flavour, so PCRE-only constructs may be reported as unknown.
Nothing is sent anywhere
The pattern is tokenised in this tab. No test string, no pattern and no flags leave your device, and the tool needs no network access, so patterns from private code are safe to paste.
Questions
Which regex syntax is explained?
The JavaScript/ECMAScript flavour your browser uses: literals, character classes, escapes, capturing/non-capturing/named groups, lookarounds, quantifiers, anchors, alternation and backreferences. PCRE-only syntax may be shown as unknown.
Will it validate my pattern?
It flags unknown escapes and unbalanced groups, but it does not execute the expression. Use it to read a pattern, not to prove it matches what you expect.
What does the flags field do?
The letters you enter (g, i, m, s, u, y, d, v) are decoded so the anchors, dot and case sensitivity read correctly in the explanation.
Does it tell me if my regex will be slow?
No. The breakdown describes structure, not performance. Catastrophic backtracking comes from nested quantifiers over overlapping alternatives, and you still need to test the expression against realistic input to find it.
Related tools
See categoryRegex Tester
Test a JavaScript regular expression against text — highlight, list matches, replace or split.
JSONPath Extractor
Query JSON with JSONPath: select values by path, wildcards, filters, slices.
Find and Replace
Replace text by plain string, whole word, or regular expression, with optional case folding.
Markdown Link Checker
Check Markdown links and anchors: broken fragments, missing references, empty URLs.