Skip to content
MermaidViewer

AI State Diagram generator

Describe your state diagram in plain English and get editable Mermaid code instantly. Describe state machines: states, transitions, choices and nested states.

Free · no sign-up for your first few diagrams each day

Example prompts for a state diagram

  • “Subscription lifecycle with trial, active, past due and cancelled”
  • “Traffic light controller”
  • “Support ticket workflow”

What a Mermaid state diagram looks like

Example state diagram

Example state diagram diagram
mermaid
stateDiagram-v2
    [*] --> Draft
    Draft --> Review : submit
    Review --> Draft : request changes
    Review --> Approved : approve
    Approved --> Published : publish
    Published --> Archived : archive
    Archived --> [*]
    state Review {
      [*] --> Pending
      Pending --> InReview : assign reviewer
      InReview --> [*]
    }
Open in the live editor

Want to write it by hand? See the full Mermaid state diagram syntax and examples, or browse templates.

Frequently asked questions

How do I generate a state diagram with AI?

Describe the state diagram you need in the box above and click Generate. The AI writes valid Mermaid state diagram code that renders instantly, and you can open it in the editor to refine it.

Is the AI state diagram generator free?

You can try it free — 5 AI generations in total, no sign-up needed. Starter includes 500 AI conversations a month and Pro is unlimited. Manual editing and export stay free after that.

Can I edit the generated state diagram?

Absolutely. The output is plain Mermaid code — edit it by hand in the live editor, or ask the AI for changes in natural language.

Other AI generators