Regex Visualizer

See the structure of a regex as a tree linked to its source; constructs the parser cannot explain stay opaque.

A regex as a tree linked to its source

Checking engine…

Not saved: closing this tab loses your work. Save keeps the regex, flags, engine, texts and tests in this browser only.
Workspace actions
Regular expression
Reference

Regex quick reference

^ · $
Start/end; m = lines.
[abc] · \d
Listed character / digit.
* · + · ?
Zero or more, one or more, optional.
(...)
Capture a numbered group.
(?<name>...)
Named capture.
(?=...)
Ahead; lookbehind varies.
i · m · s
Ignore case / line anchors / dot-newline.
Browse the full reference

Tab inserts a tab · press Esc, then Tab, to leave the editor

No regex yet.

Engine and options
the RegExp of this browser (version not pinned)
⋯

the RegExp of this browser (version not pinned)

Not available in JavaScript · This browser: x · ignore pattern whitespace; a · ASCII-only classes; U · lazy by default; J · duplicate names. u and v cannot be combined.

To run: enter a regex; enter a test text.

Test text

Tab inserts a tab · press Esc, then Tab, to leave the editor

No text yet.

Verified Fixture FX-S04

What it does

Read a regex as a tree: groups, quantifiers, classes and assertions, each linked to its place in the source.

How to use it

  1. Type the regex; no test text is needed.
  2. Move through the tree with the arrow keys; Enter selects that part of the pattern.
  3. Export the tree as SVG or JSON.

Verified example

Example

Text "AB-007"

JavaScript · This browser
([A-Z]{2})-(\d{3})

Result: "AB-007"; groups "AB", "007"

Python re · Local WASM
([A-Z]{2})-(\d{3})

Result: "AB-007"; groups "AB", "007"

PCRE2-8 · Local WASM
([A-Z]{2})-(\d{3})

Result: "AB-007"; groups "AB", "007"

Go regexp · Local WASM
([A-Z]{2})-(\d{3})

Result: "AB-007"; groups "AB", "007"

Counterexample

Text "A-7"

JavaScript · This browser
([A-Z]{2})-(\d{3})

Result: no match

Python re · Local WASM
([A-Z]{2})-(\d{3})

Result: no match

PCRE2-8 · Local WASM
([A-Z]{2})-(\d{3})

Result: no match

Go regexp · Local WASM
([A-Z]{2})-(\d{3})

Result: no match

Recorded by running fixture FX-S04 on : rp.js@1 on Node v24.21.0 (V8), v24.21.0, CPython 3.14.2 (Pyodide 314.0.7), PCRE2 10.48, go1.27.1. JavaScript results come from the rp.js@1 core on Node’s V8; your browser runs the same core.

Engines

Limits