Free Regex Explainer — Understand Any Regex Pattern

Paste any regular expression and get an instant, plain-English, token-by-token breakdown of exactly what it matches. Perfect for understanding regex you found online, inherited from a teammate, or wrote a while ago and forgot how it works. No signup, no cost, no limit.

Examples
No result yet — press Explain Regex.

About this Regex Explainer

Regular expressions are compact, but that compactness comes at a cost: a pattern like ^(?=.*[A-Z])(?=.*\d).{8,}$ is unreadable at a glance, even for experienced developers. This Regex Explainer takes any pattern you paste in and breaks it apart into individual tokens, explaining each one in plain English so you can understand exactly what the whole expression matches.

Unlike a regex tester, which only tells you whether a specific string matches, this tool explains the pattern itself — the structure, the anchors, the character classes, the quantifiers, and the groups — so you understand the "why" behind the match, not just the "yes/no".

Why explain a regex instead of just running it

Running a regex against sample input tells you whether it works for that one case, but it does not tell you why it works, or what edge cases it might silently fail on. Reading and understanding the pattern token by token is the only reliable way to know its true behavior — especially for regexes inherited from old code, copied from Stack Overflow, or generated by a tool. A quick breakdown also helps during code review, when you need to verify that a regex actually does what a pull request claims it does.

How the token breakdown works

The explainer scans your pattern from left to right, one logical unit at a time. Each unit — an anchor like ^ or $, a character class like [a-z0-9], a shorthand class like \d or \s, a group opener like ( or (?:, or a quantifier like +, *, or {2,4}— is identified and paired with a plain-English description. Flags after the closing slash (such as /pattern/gi) are parsed separately and explained in their own section.

Common regex symbols reference table

SymbolMeaning
^Start of string/line
$End of string/line
.Any character except newline
\d \w \sDigit, word character, whitespace (and their uppercase negations)
[...]Character class — matches one character from the set
( ) (?: )Capturing / non-capturing group
(?= ) (?! )Positive / negative lookahead
* + ? {n,m}Quantifiers — how many times the preceding token repeats
|Alternation (OR)

Tips for reading complex regex

  • Work through the pattern left to right, one token at a time — don't try to read it all at once
  • Identify anchors (^, $) first to understand whether the whole string or a substring is being matched
  • Break groups apart mentally — a group is just a smaller regex nested inside the bigger one
  • Watch for quantifiers immediately after a group or character class — they change the meaning significantly
  • When in doubt, test the pattern against real sample strings after you understand its structure

If you need to build a new pattern from a plain-English description rather than decode an existing one, try the Regex Generator instead.

FAQ

Is this regex explainer free?
Yes — it is completely free to use, with no signup required and no limit on how many patterns you can explain.
Does it support all regex features?
It covers the most common ECMAScript/PCRE-style syntax: anchors, character classes, shorthand classes, groups (capturing, non-capturing, named), lookaheads and lookbehinds, quantifiers, and alternation. Very advanced features such as backreferences or Unicode property escapes may not be fully broken down.
Is my regex sent to a server?
Yes, briefly — your pattern is sent to our API for parsing and is not stored or logged beyond what is needed to generate the explanation.