Skip to content

Search

Articles, tools, solutions and knowledge base guides

Start typing to search across articles, tools and apps.

State diagram maker

MEMBERS

Show the states one thing passes through and the events that move it between them, from a starting point to an end.

Free to use Files need an account Privacy protection

Diagram

Diagram

Full stop and comma move between shapes, arrows move the selected one, Enter writes its text, C starts a connection, Delete removes. Capital R, D, O, B, T, N, F or S adds a shape. K folds, P shows what leads to the shape, Command or Control with F searches.

Source, live both ways

Source, live both ways

What Mermaid can hold

What Mermaid can hold

    What Mermaid cannot hold is kept in the project. Editing the code changes only what the code says.

    Look

    Shapes

    Connections

    Paste code

    Export the diagram

    Every file is made in this browser.

    Icons and pictures

    SVG, PNG, JPEG or WebP up to 120 KB. The picture stays in this browser and in the diagram.

    Presentation in steps

      Each step brings its shapes and the connections between everything that is there by then. The arrow keys go through the steps, Escape ends.

      Saved work and templates

      On this device

      Nothing has been saved yet.

        Templates

        Found a bug or missing something? Write to us

        How it works

        Making a state diagram

        A state is a condition that lasts, such as Paid or Sent, so it is named with an adjective or a past participle, not with an action. Each transition carries the event that causes it; UML adds a guard in square brackets and an effect after a slash: payment [amount correct] / send receipt.

        Begin with Starting point and end with End point, both under More shapes. Then check that every state can be reached and that every state but the last has a way out. In the example, States of an order, an order can be cancelled while it is New or Paid, but not once it is Sent.

        A state diagram follows one thing and what happens to it. When the subject is work that people do in order, a flowchart or a business process diagram fits better; when it is messages between parts of a system, a sequence diagram.

        Help

        FAQ

        How is a state diagram written in Mermaid?

        As stateDiagram-v2. Each state is a line state "Paid" as id, each transition id --> id with the event after a colon, and [*] stands for Starting point on the left of an arrow and for End point on its right. A diagram laid out from left to right also gets the line direction LR.

        Are composite states, forks and choices supported?

        Partly. A state marked <<choice>> becomes a Diamond, while <<fork>> and <<join>> become ordinary states. States inside a composite state are drawn beside it rather than in it, and the line that opens the composite state, notes and the -- separators of parallel regions are listed as read without an equivalent.

        What is the difference between a state diagram and a state machine?

        A state machine is the model: a finite set of states, the events that cause transitions and often the actions they trigger. A state diagram is its picture. David Harel extended such diagrams with nesting and parallel regions in 1987, and UML 2 calls them state machine diagrams.

        Opening files needs an account

        Typing and pasting work without an account. To open or drop a file, sign in to your POLPROG account or create one in under a minute. Files are still processed only in this browser.

        • Secure access
        • Account in under a minute