State Diagram Tool — Model State Machines as Text

Define states and transitions in text; render a clean state diagram instantly.

A state diagram (state machine) describes the states an object can be in and the transitions between them. Mermaid Chart renders them from concise text — great for order lifecycles, auth sessions and workflow engines.

State Diagram example — code in, diagram out

Mermaid code

stateDiagram-v2
    [*] --> Idle
    Idle --> Processing : submit
    Processing --> Done : success
    Processing --> Failed : error
    Failed --> Processing : retry
    Done --> [*]
stateDiagram-v2 [*] --> Idle Idle --> Processing : submit Processing --> Done : success Processing --> Failed : error Failed --> Processing : retry Done --> [*]

What people draw with it

Workflow engines

Model order, ticket and approval states.

Session lifecycle

Document auth states: idle, pending, active, expired.

Embedded logic

Describe device or agent state transitions.

Everything you need

Explore other diagram types

Create your state diagram now

Free forever plan — 3 diagrams, all core types, no credit card required.

Start Free