States and Transitions
A state describes a stable condition, while an arrow describes the event that moves the subject into another condition. Name states with concise nouns or adjectives and transitions with meaningful events.
Create a PlantUML state diagram online, model lifecycle transitions, preview the state machine, and export PNG or SVG.
Start with the State Diagram template, edit the PlantUML source, and preview the result live.
Use this focused state diagram tool for quick previews and exports. Open the full editor for AI generation, syntax repair, sharing, and saved projects.
Model states, events, transitions, initial and final states, guards, actions, and composite states in an editable PlantUML workspace with live preview and PNG or SVG export.
Start from valid PlantUML source designed for a practical state diagram.
See the rendered diagram update as you edit the PlantUML source.
Learn the syntax and modeling choices used for order lifecycles, authentication sessions, device behavior, workflow engines, UI states, and protocol design.
Download a shareable PNG or scalable SVG from the same source.
Create and preview PlantUML without installing Java, Graphviz, or an IDE extension.
Move to the full editor for AI generation, repair, sharing, and saved projects.
Use the built-in template to create a state diagram for order lifecycles, authentication sessions, device behavior, workflow engines, UI states, and protocol design.
Start with the built-in State Diagram template.
Replace the sample states with stable conditions in your system.
Label transitions with the event, guard, or action that causes each change.
Check that initial, final, error, and recovery paths are represented.
Preview and export the state diagram as PNG or SVG.
Learn the core syntax and modeling decisions behind a useful state diagram, then apply them directly in the online editor above.
A state describes a stable condition, while an arrow describes the event that moves the subject into another condition. Name states with concise nouns or adjectives and transitions with meaningful events.
Use [*] as the initial or final marker. An arrow from [*] identifies the starting state, while an arrow into [*] identifies a completed lifecycle.
[*] --> Draft
Draft --> Published : publish
Published --> [*] : archiveLabel a transition with the common event [guard] / action convention. Square brackets communicate a condition and text after a slash communicates triggered behavior, but PlantUML displays the complete expression as a transition label rather than validating its semantics.
Pending --> Approved : approve [payment valid] / reserve stockUse nested state blocks when one high-level state contains its own lifecycle. Composite states help keep a large state machine readable without flattening every internal condition into one level.
The editable example demonstrates a practical state diagram. Change the source, check the live preview, and export the version you need.
@startuml
[*] --> Pending
Pending --> Paid : payment received
Paid --> Shipped : items dispatched
Shipped --> Delivered : order completed
Delivered --> [*]
Pending --> Cancelled : timeout
Cancelled --> [*]
@endumlUse these related tools when you need a different export format or a full PlantUML editing workflow.
Browse the complete OnUML matrix of online PlantUML tools and converters.
View all PlantUML toolsUse the general editor when you want to switch freely between diagram types.
Open the general editorCreate and export a focused sequence diagram with a built-in template.
Create a sequence diagramPlantUML keeps state diagrams in reviewable text, making them easier to update, version, reuse, and export as the design changes.
Open directly into a State Diagram template instead of adapting an unrelated example.
Store the diagram as readable text that works well in documentation and version control.
Check structure, labels, and relationships before exporting the rendered diagram.
It is a browser-based editor that starts with a State Diagram template and lets you edit PlantUML source, preview the rendered diagram, and export PNG or SVG without local setup.
Use it to model states, events, transitions, initial and final states, guards, actions, and composite states. Common uses include order lifecycles, authentication sessions, device behavior, workflow engines, UI states, and protocol design.
Use [*] as the source of the first transition, for example [*] --> Pending. Use [*] as the destination to represent the end of the lifecycle.
Yes. Define a state with a block and place its internal states and transitions inside it to create a composite state.
Yes. Preview the diagram, then download PNG for slides and quick sharing or SVG for scalable documentation and web use.
No. The online tool uses a server-backed preview, so you can edit and render the diagram directly in the browser.
Open the full OnUML editor for AI generation, syntax repair, sharing, saved projects, and multi-format diagram workflows.