Regex Explainer and Pattern Breakdown
Paste any JavaScript regular expression and get a token-by-token breakdown in plain English, so you can read what each character class, quantifier, group and anchor actually does. It updates as you type and never leaves your browser.
How to explain a regular expression
- Type or paste your pattern, without the surrounding slashes.
- Add any flags such as g, i or m in the flags box.
- Read the numbered breakdown to see what each part matches, plus a one-line summary.
Examples
A phone-number pattern
Pattern \d{3}-\d{4}any digit, repeated exactly 3 times, the literal character -, any digit, repeated exactly 4 times
A capitalised word
Pattern ^[A-Z][a-z]+$
start of line, one A to Z, one or more a to z, end of line
Frequently asked questions
What does this regex mean?
Paste your pattern and the explainer lists each token in order with a plain-English description, so /\d{3}-\d{4}/ reads as a digit repeated three times, a literal dash, then a digit repeated four times.
Which regex dialect does it use?
It reads patterns with the JavaScript RegExp engine in your browser. Most syntax is shared with other languages, but features like lookbehind and named groups follow the ECMAScript rules.
Do I include the slashes or flags in the pattern box?
No. Type only the pattern source, for example \w+@\w+ rather than /\w+@\w+/g, and put any flags like g or i in the separate flags box.
What happens with an invalid pattern?
If the pattern or flags cannot be compiled, the tool shows an error instead of a breakdown. Fix the unbalanced bracket or bad quantifier and the explanation reappears.
Can it explain groups, lookaheads and backreferences?
Yes. It labels capture groups, named groups, non-capturing groups, positive and negative lookahead and lookbehind, alternation and numbered backreferences such as \1.
Is my regex private?
Yes. Parsing and explaining happen entirely in your browser and nothing is uploaded to a server.
Related tools
Regex Tester
Test a regular expression against text with live match highlighting, capture groups and flags. See every match and replace text. Runs in your browser.
JSON Path Finder
Find and extract values from JSON by path. Paste JSON, type a path like $.users[0].name, and get the value. Lists every leaf path. Runs in your browser.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
Aspect Ratio Calculator
Calculate aspect ratios fast. Enter a ratio like 16:9 and one dimension to get the other, or enter width and height to simplify the ratio.
Base58 Encoder
Encode and decode Base58 online with the Bitcoin alphabet. Convert text to Base58 or back, UTF-8 safe, no confusing 0 O I l. Runs in your browser.
Base64 Decode
Decode Base64 to plain text online. Paste a Base64 or base64url string and get instant UTF-8 output. Free, fast and runs in your browser.