Quick Syntax Reference
All examples above use this simple plain-text syntax. Here are the key elements:
A->B: MessageSynchronous call
A-->B: ReplyReturn / async message
A->>B: AsyncAsync fire-and-forget
actor UserStick figure participant
participant "Name" as XAlias a participant
note over A,B: textAdd a note
loop Every 30sLoop fragment
alt SuccessAlt/else fragment
opt OptionalOptional fragment
Need more detail? Open the editor and click the Help button for the full syntax reference with live examples.
When to use a sequence diagram
Sequence diagrams are the go-to tool whenever you need to show how systems or people interact over time. Common use cases:
- API documentation — show exactly what requests are made, in what order, and what responses are expected
- Authentication flows — visualise login, OAuth, MFA, and session management logic
- Microservices design — map service-to-service calls and async event flows before writing code
- Bug investigation — recreate the sequence of events that led to an issue
- Team onboarding — explain complex system interactions quickly to new engineers
- Architecture review — present system designs in a format everyone can read
- Technical specs — include diagrams alongside code in version-controlled documentation
Frequently asked questions
Can I edit these sequence diagram examples?
Yes. Click the "Open in Editor" button on any example to load it directly into the free online sequence diagram editor. You can then modify the diagram, add participants, change messages, and export your result as PNG or SVG.
What format are these sequence diagrams written in?
All examples use a plain-text syntax where you declare participants and write messages using arrow notation (-> for synchronous, --> for return messages). The format is human-readable and works directly with SequenceDiagramOnline.com.
Can I use these diagrams for free?
Yes. All examples are completely free to use, modify, and export. No account or sign-up is required.
How do I create my own sequence diagram?
Go to SequenceDiagramOnline.com, type your diagram source using the plain-text syntax in the editor panel, and see the diagram render in real time. You can start from any of these examples or from scratch.
What sequence diagram tools are available online?
SequenceDiagramOnline.com is a free, browser-based sequence diagram editor that requires no installation or account. You write plain text and see your diagram instantly. It supports PNG and SVG export, shareable links, and all standard UML sequence diagram elements.