About State Diagram Maker
A state diagram makes the allowed states of a system and the events that move between them explicit. This editor keeps states and transitions in side panels, marks initial and final states, lays the diagram out on a grid, and flags structural problems such as missing initial states or transitions leaving a final state.
The shared visual workbench supplies drag, pan, zoom, undo/redo, JSON save/open and SVG/PNG/PDF export. A Mermaid dialog imports and exports `stateDiagram-v2` source, so the state machine can move into a wiki, repository or documentation pipeline where the model is text.
What this tool does
Initial, state and final types
Every node has a state type; the initial and final states use circles, regular states use rounded cards, and changing the initial state clears the previous initial marker.
Labeled transitions
Add transitions with a source, target and optional event label. Missing endpoints are rejected, while self-loops and transitions from final states are flagged for review.
State validation
The editor warns when there is zero or more than one initial state and when a final state has outgoing transitions, without silently editing the model.
Mermaid stateDiagram-v2 exchange
Import and export [*] start/end transitions, state aliases and labeled transitions through the workbench Mermaid dialog.
Automatic grid layout
Initial states come first, then regular states and finals, arranged in a grid; drag individual states to refine a presentation.
Shared workbench export
Export the visual model as SVG, PNG or PDF and save project JSON for exact positions and state types; all processing stays in the browser.
How to use State Diagram Maker
- 01
Add states and set types
Add states with the Add state button, then choose Initial, State or Final for each. The editor keeps one initial state by demoting the previous one when needed.
- 02
Add transitions
For each transition choose a source and target and record the event label. Transitions that start or end at a missing state are refused.
- 03
Review validation warnings
Check for a missing or duplicated initial state, transitions leaving a final state, and accidental self-loops; fix the model before exporting it.
- 04
Use the Mermaid dialog
Open the toolbar Mermaid button to copy or download the stateDiagram-v2 source, or paste a compatible source and import it back into the canvas.
- 05
Export or save JSON
Use the workbench toolbar for SVG, PNG or PDF, and save project JSON when exact state positions and metadata need to be reopened later.
How this tool works
- Works with
- STATES & TRANSITIONS → STATE DIAGRAM
- Processing
- Client-side, in your browser. Nothing is uploaded.
- Requirements
- A modern browser with JavaScript, SVG and canvas support · Unique state names and a source and target for every transition, with one initial state for a valid machine
Limitations worth knowing
- Validation checks are structural and advisory; they do not prove reachability, termination, determinism or formal correctness.
- The model supports simple states only: no composite or hierarchical states, parallel regions, entry/exit actions or guarded transitions.
- The editor is limited to 100 states and 300 transitions, and the grid layout does not automatically avoid edge crossings.
- Mermaid import covers a deliberately simple subset; malformed files, composite states and advanced directives are rejected, and Mermaid does not preserve exact positions.
Privacy and file handling
State names, state types and transition labels are processed in this browser tab. SVG, PNG, PDF, project JSON and Mermaid source are generated on your device, and the model is never uploaded or stored on a server unless you choose to share the downloaded files.
Read the full privacy policy
