New: TypeFire 7 and TypeFire for Chrome 2.0.
Free · Live examples · No sign-up

Mermaid state diagrams, for anything with a status

A state diagram shows the statuses something can be in and what moves it from one to the next. In Mermaid that's one line per move: Placed --> Paid: payment ok. Edit the example and watch it redraw.

Free in your browser. On a Mac, TypeFire opens every .md file like this, right from Finder.Download free for Mac

State diagram.md
FileEditViewInsertFormatHelp
State diagram.md

Order statuses

payment okcanceledPlacedPaidCanceledShippedDelivered
payment okcanceledPlacedPaidCanceledShippedDelivered

Try this

  • Add Shipped --> Returned: customer returns it.
  • End it with Returned --> [*].
Loading the editor…Your files stay in your browser
  • Your files never leave your browser
  • Free, no sign-up
  • Download as Markdown, Word, a web page or a PDF

This editor comes from TypeFire, free for Mac

Your whole folder of Markdown notes in tabs, Quick Look previews in Finder, plus a text expander and a clipboard manager.

How it works

Write a Mermaid state diagram

  1. 01

    Start and end

    Begin with stateDiagram-v2. [*] --> Placed draws the start, and Delivered --> [*] draws an end.

  2. 02

    Add the moves

    One line per transition: Placed --> Paid. Add a colon and text to say what causes it.

  3. 03

    Group if needed

    Wrap states in state Fulfillment { ... } to draw a composite state with its own inner steps.

Mermaid state diagram text on the left becomes a drawn order lifecycle from placed to delivered
Free for Mac and Chrome

Diagrams in your notes? Get TypeFire.

On the Mac, every Mermaid block in your notes draws in TypeFire's colors. Open one full window to zoom in, resize it, link a box to another note, and save it as SVG or PNG.

Download free for MacAdd to Chrome7 day Pro trial, no card required.

Free text expander, markdown notes and a clipboard manager. $18 once for unlimited clips, notes sync and AI prompts.

At a glance

State syntax at a glance

Every line is a state, a move, or a group.

[*] --> A
The start, pointing to A
A --> [*]
An end after A
A --> B: label
A move from A to B with a reason
state "Waiting for payment" as W
A long name with a short id
state Group { ... }
A state with states inside it
state c <<choice>>
A decision point
note right of A: text
A note beside a state

Drawn from the example above

What it does

State diagram tips

  1. Name states as statuses

    Paid, Shipped, Canceled. Nouns or past tense read better than actions.

  2. Label every move

    A word on each arrow, like payment ok, makes the rules clear to someone new.

  3. Show a fork in the road

    state check <<choice>> draws a decision point with several ways out.

  4. Turn it sideways

    Add direction LR on its own line to draw left to right.

A Markdown document with a diagram downloaded as a PDF with the diagram drawn in it
Take it further

The same editor, without the browser tab

This editor comes from TypeFire, a free app for Markdown notes, a text expander and a clipboard manager. Here it works on the files you open. In the app, it opens your whole folder.

TypeFire for Mac with several Markdown notes open in one tab bar

TypeFire for Mac

  • Press Space on any .md file in Finder and read it rendered, with Quick Look.
  • Open a folder of Markdown, an Obsidian vault included, with tabs, search and links.
  • A text expander and a clipboard history in the same free app.
In a browser email, typing thx and a space expands into a whole thank-you reply

TypeFire for Chrome

  • This editor in its own tab, one click from the toolbar.
  • Your folder of .md notes in tabs, with search and links.
  • A text expander and your clipboard history on every site.

Frequently asked questions

Still not answered?

Write a Mermaid stateDiagram-v2 in a code block marked mermaid, with [*] for the start and end and one line per transition.

stateDiagram-v2 is the newer renderer with better layout.

Use it for new diagrams; the syntax is the same.

Add a colon and text after the arrow: Placed --> Paid: payment ok.

Use a composite state: state Fulfillment { Picking --> Packing } and link to it like any other state.

Yes. Declare state check <<choice>>, then draw arrows out of it with a label on each.

Statuses everyone can read

TypeFire for Mac draws state diagrams in your notes, in light and dark, with a viewer to zoom in. Free.

Download free for MacAdd to ChromeSee what $18 adds7 day Pro trial, no card required.

Free text expander, markdown notes and a clipboard manager. $18 once for unlimited clips, notes sync and AI prompts.

your clips your snippets