State diagram examples
State machine diagram examples from a description
State machine diagram examples — states, transitions, and guards — generated from plain English and laid out automatically. Free to try.
Prose in. Diagram out.
The prompt
An order starts Pending. When paid it becomes Processing, then Shipped, then Delivered. From Pending it can be Cancelled.
ChartCraft draws
More state diagram examples
Generated with ChartCraft and published in the examples gallery — open one to see its prompt, or use it as a starting point.
The notation, in 30 seconds
A state machine is four ideas: states, events, transitions, and the start/end markers. Everything else is refinement.
| Element | What it means |
|---|---|
| Initial state (filled dot) | Where the machine begins — exactly one per diagram. |
| State (rounded box) | A condition the object can rest in: Pending, Shipped, Locked. Name with adjectives or nouns, never verbs. |
| Transition (arrow + event) | The move between states, labelled with the event that causes it: pay, timeout, cancel. |
| Guard ([condition]) | A bracketed condition that must hold for the transition to fire: pay [balance ≥ price]. |
| Final state (bullseye) | A terminal state the object never leaves — Delivered, Closed. |
| Self-transition | An event that re-enters the same state — a retry that doesn't change status. |
Best practices — and the classic mistakes
Do
- Name states with adjectives or past participles (Paid, Locked), events with verbs (pay, lock).
- Model one object per machine — the order, not the order plus the warehouse plus the emails.
- Give every non-terminal state an exit for failure events, not just the happy path.
- Prefer guards over duplicate states: one “pay” transition with [balance ≥ price] beats two near-identical states.
- Keep it to 5–9 states; past that, look for nested (composite) states or a second machine.
Avoid
- States named as actions (“Sending email”) — that's a transition or activity, not a resting state.
- Missing failure transitions — the machine describes the demo, not the system.
- Two states that differ only by a flag — usually one state with a guard.
- No terminal state, leaving readers unsure whether the lifecycle ever ends.
Questions
How were these state diagram examples made?
Each example was generated by ChartCraft from a plain-English prompt, then laid out automatically — the same way you'd make your own. Click any example to see its full page.
Can I use these state diagram examples as templates?
Yes — open an example, copy its prompt into the studio, then edit it in plain English to fit your case.
What's the difference between a state diagram and a flowchart?
A flowchart follows a process from start to finish — steps happen once, in order. A state machine describes one object over its whole life: it rests in states and moves only when events fire, possibly cycling forever.
How do I know if something is a state or a step?
Ask whether the object can sit there indefinitely. “Pending approval” can last a week — state. “Send the approval email” takes milliseconds and completes — that's a transition's side effect.
Is it free?
Your first 3 diagrams are free with no account, then 5 a month on a free account.