PixelOkay
State Machine DesignerVisual logic, made clear.
Works locally
Tools
DEVELOPER TOOLS / VISUAL WORKSPACE

State Machine Designer

Design and simulate local finite-state machines and bounded compound workflows. Replay tests, review guard decisions, and export editable projects and diagrams.

No signup · No uploads · Offline after load
DESIGN
100%
Drag states to arrange · Drag background to pan · Shift+arrow nudges 10px
LIVE TESTING

Simulator Draft

Select an available event to test a transition.
Why is an event blocked?
Test context Change variables to test guards
Reproducible test cases Record actual event paths and replay
No test cases saved.

Only successfully replayable traces are saved. A later model change marks prior recordings stale. Results are bounded tests, not exhaustive proof.

Using State Machine Designer

Add states and event transitions, choose an initial state and configure supported guards or assignments. Simulate events, inspect blocked transitions and save project JSON alongside diagrams, tables or traces.

V3 supports an explicitly bounded nested compound-state model with a single active leaf, child-first event handling and parent fallback. It does not support parallel, history, timers, automatic completion or full SCXML interoperability. Arbitrary JavaScript guards are never executed. Bounded test-path exploration and QA reports are not formal proofs. Browser drafts can fail or be cleared, so retain editable JSON backups.

Choose an editable finite-state machine or a review output

Practice: a two-state start-stop machine

  1. Create Idle and Running states and choose Idle as the initial state.
  2. Add a start event from Idle to Running and a stop event back to Idle.
  3. Simulate those events, inspect the trace and save JSON before adding guards or assignments.

This is an authored modeling exercise, not a formal proof or an executed production controller.

Statechart and export guidance

Flat FSM vs compound statechart: A flat machine has one active state. The V2 project schema permits bounded compound parent states with exactly one active leaf; child transitions are considered first, then eligible parent transitions. Nested final states do not create completion events.

Replay tests: Run a sequence in the simulator, save its trace, then replay it against the current model. Previously recorded cases are marked stale after semantic changes. The output verifies only the stored examples, not every possible execution.

Developer handoff: Download a ZIP containing current editable JSON, SVG diagram, transition CSV, Markdown state/event reference, quality report, replay cases and a format-compatibility manifest. Nested machines intentionally cannot use the flat SCXML or Mermaid serializers. Source code and remote workflow execution are not generated.

Recovery: Local drafts are best effort; export a portable JSON backup, especially before replacing a project or resolving another-tab conflicts. Project content is processed on this device.

State machine questions

Can I use arbitrary JavaScript guards or nested statecharts?

No arbitrary JavaScript is executed. Compound states support a direct initial child and ancestor event fallback in V2 projects. Parallel regions, history, timed and eventless transitions are not supported. Use V2 project JSON to preserve those compound semantics; flat SCXML export is intentionally blocked for nested machines.

Does a successful simulation prove every possible path is correct?

No. Simulation and bounded test-path exploration inspect particular conditions and paths. Their reports are not formal verification or full SCXML conformance. Keep the editable project and review untested cases separately.

Related tools