The Thaumatorium:
Where the magic happens

Regex to NFA/DFA Visualizer

Parse a small regular-expression subset, build a Thompson NFA, and derive the DFA from it. The graph is deterministic per input, so the same regex always redraws the same way.

Supported: concatenation, alternation, grouping, *, +, ?, escaped literals, and simple character classes like [abc] or [Gg]. Unsupported: lookarounds, anchors, counted quantifiers, shorthand classes like \d, and advanced class syntax.

Normal state Accept state Start arrow points into the start state

Step By Step

  1. 1. Parse the input regex

    Enter a regex to begin.

  2. 2. Insert explicit concatenation and convert to postfix

    Nothing parsed yet.

  3. 3. Build a Thompson NFA

    No NFA built yet.

  4. 4. Run subset construction to get the DFA

    No DFA built yet.

  5. 5. Minimize equivalent DFA states

    No minimized DFA built yet.