Free diagram maker
State diagram maker
A state diagram lists every state a thing can be in and every way it can move between them. Drawing one usually turns up a transition nobody had implemented and a state nobody can get out of.
Free, no account, and nothing you draw is uploaded.
Published . By the DiagramDesk team.
States are rounded boxes, transitions are labelled arrows, and a filled circle marks where everything starts.
A worked example: an online order
An order starts as Placed. Payment confirmed moves it to Paid; Payment failed moves it to Cancelled. From Paid, Packed moves it to Shipped, and Delivered to its final state. From Paid, a cancellation request can still move it to Cancelled, which needs a refund on the way.
The value of drawing it is in the arrows that are missing. Can a shipped order be cancelled? If there is no arrow, the answer is no, and that is a business decision someone has now made on purpose instead of by accident in the code.
Drawing the states
- Open the template, which runs draft to in review to published or rejected.
- List every value your status field can hold, and give each one a state.
- Draw a transition for every legal change, labelled with what triggers it.
- Add the filled circle for the initial state and a ringed circle for any final one.
- Check each state can be left. A state with no way out is a bug waiting to happen.
- Check no transition is missing. Anything a user can do should appear on an arrow.
Where a state diagram helps
- Order, ticket, application and document workflows
- Any status field that has grown over time and nobody has audited
- Embedded and control logic
- Coursework on finite state machines
What to check once it is drawn
- Every state is reachable
- A state with no incoming arrow is dead code, or a missing transition.
- Every state can be left
- Except a genuine final state, which should be drawn as one so the reader knows it is deliberate.
- Label the trigger, not the result
- “submit” on the arrow, “In review” in the box. Putting the result on the arrow says the same thing twice.
- Watch for two arrows on one trigger
- If the same event leaves a state twice, something else decides which, and that condition belongs on the label.
Ready to draw yours?
The example above opens in the editor, so you can edit rather than start cold.
State diagram questions
Is this the same as an activity diagram?
No. A state diagram is about what something is; an activity diagram is about what happens in order. They look similar and are easy to confuse.
Can I show nested states?
Draw a container around the group and give it a name. Transitions can point at the container to mean any state inside it.
How do I show a guard condition?
Put it in square brackets after the trigger on the connector label, which is the UML convention.
Can it simulate the machine?
No. It draws the diagram; it does not run it.