Regex Explainer & Visualizer
Paste a JavaScript regular expression and read it back as a plain-English syntax tree. Hover any row to see exactly which characters of the pattern it came from, then run it against sample text to inspect every match and capture group.
Applied: i (ignore case)
Pattern breakdown
Highlighted span: none — hover the pattern, or a tree row, to link the two.
- Capture groups
- 0
- Anchored
- start + end
- AST nodes
- 21
- Pattern length
- 28
Syntax tree (20 rows)
Test against sample text
Anchored and case-insensitive, with a character class, an alternation-free range and a counted quantifier.
73 characters · 4 lines · 0 line(s) with a match · at most 0 per line
What each part of a pattern means
- literala character that must appear exactly as written
- escapea backslash sequence such as \d, \w, \s or \u00e9
- dot. — any character except a line break, unless the s flag is on
- class[...] — one character from a set; [^...] is the opposite
- quantifier* + ? {n} {n,} {n,m}, made lazy with a trailing ?
- anchor^ $ \b \B — zero-width positions between characters
- group( ) captures; (?: ) does not; (?<name> ) captures by name
- lookaround(?= ) (?! ) (?<= ) (?<! ) — check without consuming
- backreference\1 or \k<name> — replays text captured earlier
- alternation| — try the left side, then the right side
About this tool
Your pattern goes through a hand-written recursive-descent parser that builds a real syntax tree, describes every node in plain English, and links each row back to the exact characters it came from. The same pattern is then executed against your sample text with a bounded loop — the g flag is cloned in when it is missing, zero-length matches advance lastIndex so the loop cannot spin, and matching stops at 5,000 hits. Parsing, matching and the new RegExp cross-check all happen in your browser; neither the pattern nor the sample text leaves the page.
- 100% free — no account needed
- Runs in your browser
- Nothing is uploaded
Frequently asked questions
Is Regex Explainer & Visualizer really free?
Yes. Regex Explainer & Visualizer is completely free on PureBrowser — every feature, with no account, no trial, and no credit card.
Does Regex Explainer & Visualizer upload my data?
No. Regex Explainer & Visualizer runs entirely inside your browser, so anything you type, paste, or open stays on your own device.
Do I need to sign up or install anything?
Neither. There is no account and nothing to download — open the page and Regex Explainer & Visualizer is ready to use on desktop or mobile.
Does Regex Explainer & Visualizer work offline?
Once the page has loaded, yes. All of the processing happens locally in your browser, so it keeps working without a connection.
More developer tools
Folder Structure Generator
Build folder structure diagrams, ASCII directory trees, and file tree visualizations for READMEs and docs.
.gitignore Generator
Generate merged .gitignore rules for your stack with one click.
JSON to TypeScript Interface
Convert JSON into TypeScript interfaces with inferred nested types.
Text to Slug Converter
Convert titles and phrases into clean SEO-friendly URL slugs.
UTM Builder
Build campaign URLs with UTM parameters for analytics tracking.
JSON Formatter & Validator
Validate, format, and minify JSON directly in your browser.