Regex Explainer
Paste a regular expression and read it back in plain English — every token explained, from anchors and classes to lookaheads.
Regular expressions are write-only code for most people: the person who wrote one can rarely read it back a month later. An explainer turns the symbols back into sentences so the intent can be checked before the pattern is trusted. Worked example: the pattern ^\d{3}$ breaks into 4 parts — ^ anchors the match to the start, \d matches a digit, {3} repeats the previous item exactly 3 times, and $ anchors the match to the end — so the whole pattern means “exactly three digits and nothing else”, which is the kind of sentence you can hold against your requirements. Alternation reads just as plainly: in a|b, the | token is the or choice between the two sides.
The pattern is explained in this browser, token by token. What you type is never uploaded, stored or put into a link; it stays in this page on your device only.
Quick answers
What does ^\d{3}$ mean?
Start of string, then a digit repeated exactly 3 times, then end of string — in other words, exactly three digits and nothing else. The 4 tokens are ^, \d, {3} and $.
The explainer lists every token in order with its meaning, so a pattern can be reviewed as a sentence before it is trusted.
How is an explainer different from a regex tester?
The explainer tells you what a pattern says; a tester tells you what it matches on real strings. Use this page to read the pattern, then pair it with the Regex Tester (/regex/) to verify the behaviour.
Reading first catches intent bugs — a missing anchor, a wrong count — that testing a few happy-path strings would never reveal.
How to use
- Paste or type the regular expression you want to understand — the explanation updates as you type.
- Read it left to right: each token (an anchor, a class, a quantifier, a group) is listed with what it actually matches.
- Watch for the traps the explainer makes visible: a greedy quantifier where you wanted a lazy one, a character class that is not negated, a lookahead you forgot you wrote.
- When the pattern makes sense, pair it with the Regex Tester (/regex/) to run it against real text and confirm it matches what the explanation promises.
About this tool
Coverage is the common vocabulary of real-world patterns: anchors ^ and $, the dot, quantifiers * + ? and the counted forms {n}, {n,} and {n,m}, the shorthand classes \d \D \w \W \s \S and the word boundary \b, bracket classes including negated [^...] classes, capturing groups (...), non-capturing groups (?:...), lookaheads (?=...) and their negative and lookbehind cousins, escaped literal characters, and plain literal text grouped into one token. Exotic engine-specific syntax beyond that list is explained as literals rather than guessed at. Once the reading makes sense, pair it with the Regex Tester (/regex/) and test the pattern against the strings it will actually meet — an explanation tells you what a pattern says, only testing tells you what it does on your data.
Frequently asked questions
Which regex syntax does the explainer cover?
The common core shared by JavaScript, Python, Java and most other engines: anchors, dot, star/plus/question quantifiers, counted repeats {n}, {n,} and {n,m}, shorthand classes like \d and \w, bracket classes and negated classes, groups, non-capturing groups, lookaheads and lookbehinds, alternation, and escaped literals.
What does {3} mean after a token?
Exactly 3 repeats of the item before it. So \d{3} is three digits in a row. The related forms are {n,} for at least n, and {n,m} for between n and m repeats.
Why is my literal text shown as one token?
Consecutive ordinary characters have no special meaning, so they are grouped and explained as one literal run — abc simply matches the text abc in order. Grouping keeps the explanation at the same length as the idea, instead of one line per letter.
Is my pattern sent anywhere to be explained?
No. The pattern is parsed in this browser, token by token, and what you type is never uploaded, stored or put into a link.
First time embedding? Read the step-by-step guide →
More free tools
UUID Generator
Generate random v4 UUIDs in bulk.
JSON Formatter & Validator
Format, minify and validate JSON in one click.
What Is My IP
See your public IP address instantly. No sign-up, nothing stored.
Regex Tester
Test, check and validate regular expressions with live highlighting.
JWT Decoder
Decode a JWT token without the secret — see its header and payload.
SHA-256 Hash Generator
Generate SHA-256 / SHA-512 hashes instantly.