📖 What is this tool?
A sequence diagram shows how systems, services or users exchange messages over time — reading top to bottom. They are the standard way to document API flows, authentication handshakes, payment processing and microservice communication. This builder uses Mermaid syntax: you type participants and arrows, and the diagram renders live. Choose from Auth Flow, API Request and Payment templates, or write your own from scratch. Everything runs in your browser — your diagrams are never uploaded.
💡 Example
Input
sequenceDiagram
Client->>API: POST /login
API->>DB: Verify
DB-->>API: User found
API-->>Client: JWT Token
Output
A rendered diagram with four participants (Client, API, DB) and arrows showing the login request flow, verification and JWT token response
🛠️ Common Use Cases
- Document API request/response flows
- Design authentication sequences
- Map microservice communication patterns
- Plan payment processing flows
- Visualize WebSocket message exchanges
📝 Mermaid Sequence Syntax Reference
participant A — declare a participant (box appears in order declared)
A->>B: message — solid arrow, synchronous request
B-->>A: response — dashed arrow, response or async message
A-xB: failed — crossed arrow, lost or rejected message
activate B / deactivate B — show a participant is active (colored bar)
loop Every 5s ... end — repeated block
alt Success ... else Failure ... end — conditional branches
Note right of A: text — annotation (use left of, right of, or over A,B)
⚠️ Common Mistakes
- Using
-> instead of ->> — single arrow is deprecated in Mermaid sequence diagrams; always use the double-arrow form
- Forgetting the colon after the arrow —
A->>B alone is invalid; add : message text
- Putting participants in the wrong order — participants appear left-to-right in the order they are first mentioned; use explicit
participant declarations to control layout
- Unclosed blocks — every
loop, alt, opt, par and critical block must end with end
❓ Frequently Asked Questions
What is the difference between -> and -->? ▾
->> is a solid arrow (synchronous request), -->> is a dashed arrow (response or async). Use ->> for requests and -->> for responses to make diagrams more readable.
How do I show loops in sequence diagrams? ▾
Use the loop keyword: loop Every 10 seconds
Service->>DB: Poll for updates
end. The loop block visually groups repeated interactions.
Can I add notes to sequence diagrams? ▾
Yes: Note right of ServiceName: Your note text. Use "right of", "left of" or "over" to position notes relative to participants.
How do I show conditional logic (if/else)? ▾
Use the alt/else block: alt Success ... else Failure ... end. Each branch renders as a labeled region in the diagram.
How do I show parallel (concurrent) messages? ▾
Use par ... and ... end to show messages happening at the same time. Each "and" keyword starts a new concurrent branch.
Can I export the diagram as an image? ▾
Yes — right-click the rendered diagram and choose "Save image as" to download it as PNG. You can also copy the Mermaid syntax into documentation tools like Notion, GitHub or Confluence that render it natively.
🔒
Your data stays private. All processing happens entirely in your browser. Nothing is ever sent to our servers. You can use this tool offline after the page loads.