NFA Explorer Studio

Build, visualise, validate, and simulate nondeterministic finite automata with ε-transitions, multiple active states, reversible playback, and branch-level explanations.

NFA · ε · Branching Runs entirely in your browser
Choose an example or create a custom automaton, then enter an input word.

State-transition diagram

The start arrow, accepting states, ε-transitions, and active states are visually distinguished.

Start Accepting Active Dashed edge = ε
No valid automaton is available.

Automaton definition

Use comma-separated unique state names.

Do not include ε in the alphabet.

From Label To Actions

Editor actions

Validation checks

The editor checks state names, duplicate entries, alphabet symbols, start and accepting states, transition references, ε-label syntax, and malformed definitions.

Destructive action safety

Deleting, resetting, clearing, or replacing an automaton requires confirmation. Imports are validated before they can replace the current definition.

JSON definition

Import from file

The file is read locally. Invalid data will not overwrite the current automaton.

Expected JSON structure
{
  "name": "Example",
  "description": "Language description",
  "states": ["q0", "q1"],
  "alphabet": ["a", "b"],
  "startState": "q0",
  "acceptingStates": ["q1"],
  "transitions": [
    { "from": "q0", "symbol": "a", "to": "q1" },
    { "from": "q0", "symbol": "ε", "to": "q1" }
  ],
  "exampleWords": ["", "a", "ab"]
}

How the simulator works

The simulator starts with the ε-closure of the start state. For each input symbol, it follows every matching transition from every active state, then computes the ε-closure of every newly reached state. The input is accepted when at least one reachable state is accepting after all input has been consumed.

A visited-configuration key containing the state, input position, and branch context prevents repeated ε-cycles from causing infinite loops. The complete simulation history is stored so playback can move forward and backward.

Supported labels and names

  • State names may contain letters, numbers, underscores, and hyphens.
  • Alphabet symbols should normally be single Unicode characters.
  • Use ε, eps, epsilon, or an empty label for an ε-transition.
  • Comma-separated labels such as a,b create alternatives.
  • Whitespace may be preserved or removed from the input.