FSM Tools
by eHelpFultools.tech

Regular Expression to DFA Converter

Transform your regex patterns into deterministic finite automata with visualization

1
Input Regex
2
Postfix Conversion
3
NFA Construction
4
DFA Conversion
5
Minimization
Input
Results

Input Parameters

Supported: . wildcard, * Kleene star, + one or more, ? optional, | union, () grouping

How It Works

The conversion process follows these steps:

  1. Parse the regular expression and convert to postfix notation
  2. Apply Thompson's Construction to build an NFA
  3. Use Subset Construction to convert NFA to DFA
  4. Optionally minimize the DFA

Supported Syntax

  • a b c ... 0-9 (single alphanumeric symbols)
  • . wildcard (matches any one symbol from the provided alphabet)
  • () grouping / precedence
  • | union (alternation)
  • * Kleene star (zero or more)
  • + one or more
  • ? optional (zero or one)
  • Implicit concatenation (just writing items next to each other) appears as · in postfix output (you do NOT type this symbol)
  • Provided alphabet filters transitions (input outside alphabet is ignored)

Not Supported

  • Character classes / ranges: [abc], [a-z], negated classes
  • Escapes & special sequences: \d, \w, \s, \n, etc.
  • Bounded quantifiers: {n}, {n,}, {n,m}
  • Anchors: ^, $
  • Lookarounds: (?= ), (?! ), (?<= ), etc.
  • Backreferences: \1, \2, ...
  • Non / named capturing forms: (?: ), (?<name> )
  • Lazy quantifiers: *?, +?, ??
  • Inline flags: (?i), (?m), etc.

This tool focuses on core regular language constructs suitable for DFA generation. Unsupported features typically require non-regular or backtracking engines.

Conversion Results

Postfix Notation

Enter a regular expression and click "Convert to DFA"

NFA Transition Table

NFA table will appear here

DFA Transition Table

DFA table will appear here

Minimized DFA

Minimized DFA table will appear here

Minimized DFA Diagram

Minimized DFA diagram will appear here