Skip to content

Regex Visualizer — Railroad Diagram Generator for Regular Expressions

Free online regex visualizer that renders any JavaScript regular expression as an interactive railroad diagram, with a plain-English breakdown, live match tester, and ReDoS warnings — all in your browser.

Updated

What is the Regex Visualizer — Railroad Diagram Generator for Regular Expressions?

How it works

Examples

Visualize an email pattern

Pattern: [\w.+-]+@[\w-]+\.[a-zA-Z]{2,} Flags: i
A diagram showing a character-class loop for the local part, a literal "@", a domain loop, a literal ".", and a 2-or-more letter loop for the TLD

Break down named capture groups

Pattern: (?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})
Three labeled group boxes — "year", "month", "day" — each containing a \d loop with an exact repeat count, connected by literal "-" pills

Spot a catastrophic backtracking risk

Pattern: (a+)+b
A diagram with a repeat loop nested inside another repeat loop, plus a warning: "nests unbounded quantifiers... can cause catastrophic backtracking"

Frequently asked questions