Below follows help and examples of all different sequence diagram UML elements supported by the editor.

Click the copy icon below the sequence diagram images to copy the source text and paste it in the source editor.

View Menu

Presentation Mode - Hides menus, button, and text editor
Participant Overlay On Scroll - Displays the participants in the top of the diagram as an overlay when they are scrolled out of view (enabled by default)
Read Only Presentation Mode - When in presentation mode, disables editing the diagram using the mouse and instead allows to grab the diagram and move it around instead of scrolling
Shrink to Fit - Scales the diagram to fit the page when it grows larger than the available space (works in presentation mode and edit mode)

Buttons on all platforms

exportExport the diagram to images files, share link, or render it for copy / paste.

participantAdds a new participant into the diagram of type participant.

zoom inZoom in (also affects the export to image files).

zoom outZoom out (also affects the export to image files)

Buttons on SequenceDiagram.org only

newStart working on a new diagram (same as opening a new tab in your browser, or changing the File Name in the save menu).

openOpen a source text file directly from your hard drive, the browsers local storage, or cloud storage.

saveSave the source text.

Keyboard Shortcuts

Ctrl-S / Cmd-S - Save diagram source
Ctrl-O / Cmd-O - Open diagram source
Ctrl-M / Cmd-M - Presentation mode
Ctrl-Space / Cmd-Space - Autocomplete in source
Ctrl-F / Cmd-F - Find in source
Shift-Ctrl-F / Cmd-Option-F - Replace in source
Shift-Ctrl-R / Shift-Cmd-Option-F - Replace all in source
Alt-G - Go to line in source

Comments

# This is a comment // This is also a comment

Title

sequence diagram title example
title Title A->B:info
sequence diagram title with line break example
title <size:30><color:#violet>THIS IS A LARGE TITLE\nWITH A </color>LINE BREAK</size> participantspacing 14 Alice->Bob:info Alice<--Bob:info

Participants

sequence diagram participant example
participant Participant
sequence diagram actor example
actor Actor
sequence diagram boundary example
boundary Boundary
sequence diagram control example
control Control
sequence diagram database example
database Database
sequence diagram entity example
entity Entity
sequence diagram actor with multi line example
actor "**++Big and\nbold name" as actorMultiline #red
sequence diagram participant with multi line example
participant "some long\nname with **//styling//**" as participantMultiline
sequence diagram materialdesignicons icon example
materialdesignicons F1FF escalator
sequence diagram font awesome 6 icon example
fontawesome6solid f48e "++**Syringe**++" as Syringe #red fontawesome6regular f0f8 Hospital #blue fontawesome6brands f3b6 Jenkins #green
sequence diagram participant styling example
actor #green:0.5 Actor boundary #ff00ff:2 Boundary control :1 Control database #blue:1 Database #red entity :0.5 Entity participant :0 Participant participant :0 "++**Participant 2**++" as p2
sequence diagram participant images example
image data:image/png;base64,iVB... png

Bottom Participants

sequence diagram bottom participants example
bottomparticipants participant A participant "BBBB\nBBBB" as B materialdesignicons f14d note fontawesome6regular f0f8 Hospital fontawesome6brands f3b6 Jenkins actor Actor A->B:info A->note:info A->Hospital:info A->Jenkins:info A->Actor:info

Messages

sequence diagram request response example
A->B:request A<--B:response
sequence diagram async request response example
A->>B:request A<<--B:response
sequence diagram self referencing message example
A->A:self message
sequence diagram line weight message example
Alice-:4>Bob:Test12345 Alice-:2>>Bob:Test Alice-#00ff00:2>Bob:Test Alice--#red:4>Bob:Test Alice<<#red:3--Bob:Test Alicex#red:3-Bob:Test Alice-:4>(5)Bob:Test Bob-:4>Bob:Test Alice<-:3>Bob:Test Alice<-#00ff00:2>Bob:Test Alice<-#red:3>Bob:Test

Non-instantaneous Messages

sequence diagram non-instantaneous message example
participant A participant B participant C A->(1)B:info A(1)<--B:info A(1)<-C:info B->(5)C:info\ninfo activate B activate C B(1)<--C:info deactivate C deactivate B
sequence diagram non-instantaneous messages arriving after later message example
Client->(5)Server:first sent message space -6 Client->Server:later message

Incoming and Outgoing Messages

sequence diagram incoming and outgoing messages example
[->A:info B->]:info

Failure Messages

sequence diagram failure message example
A-#redxB:failure 1 C-xB:failure 2 Bx-B:failure 3 C(5)x--A:failure 4

Notes and Boxes

sequence diagram notes over example
note over A:note over one\nmultiple lines\nof text note over A,B:note over several
sequence diagram notes on sides example
note left of A:note left of note right of A:note right of
sequence diagram box over example
box over A:box over one box over A,B:box over several
sequence diagram boxes on sides example
box left of A:box left of box right of A:box right of
sequence diagram angular box over example
abox over A:abox over one abox over A,B:abox over several
sequence diagram angular box on sides example
abox left of A:abox left of abox right of A:abox right of
sequence diagram round box over example
rbox over A:rbox over one rbox over A,B:rbox over several
sequence diagram round box on sides example
rbox left of A:rbox left of rbox right of A:rbox right of
sequence diagram angular box left and right example
aboxright over A,B:This is angular boxright aboxleft over A,B:This is angular boxleft aboxright over A:This is angular boxright aboxleft over B:This is angular boxleft aboxright right of A:This is angular boxright aboxright left of B:This is angular boxright aboxleft right of A:This is angular boxright aboxleft left of B:This is angular boxleft

References

sequence diagram notes over example
A->B:info ref over B,C:other interaction C->D:info

Dividers

sequence diagram divider example
participant A participant B participant C participant D ==info==

Create and Destroy

sequence diagram create message example
participant A actor X participant B A->B:info B-->*C:<<create>> note over C:do something B<-C:info destroy C B->*X:message to X note over X:do something destroyafter X A->B:info
sequence diagram create without message example
A->B:info create C note over C: C created without message A<-C:info
sequence diagram destroy silent example
A->>B:request A<<--B:response destroysilent B destroysilent A C->D: info

Activations

sequence diagram activation example
participant A participant B participant C participant D A->B:info activate B B->C:info activate C C->>D:info activate D B<--C:info deactivate C A<--B:info deactivate B B<-D:callback deactivate D activate B A<<--B:info deactivate B
sequence diagram activation with self reference example
participant B participant D activate D B->D:info activate B deactivateafter B D->D:info activate D space deactivate D
sequence diagram activation with self message example
activate Alice Alice->Alice:privateMethod() activate Alice Alice<<--Alice:returnValue deactivate Alice Alice->Alice:privateMethod() activate Alice Alice<<--Alice:returnValue deactivateafter Alice

Auto Activation

sequence diagram automatic activation example
autoactivation on A->B:info B->C:info B<-C:info B-->C:info B->B:info deactivateafter B B<--C:info A<--B:info autoactivation off A->B:info A<--B:info

Spaces

sequence diagram space example
participant B participant D activate D B->D:info activate B space 3 deactivate B D->D:info activate D space deactivate D

Fragments

sequence diagram opt fragment example
opt optional note over A:info A->B:info end
sequence diagram alt fragment example
alt case 1 A->B:info else case 2 A->B:info else case 3 A->B:info end
sequence diagram loop fragment example
loop i < 1000 note over A:info A->B:info end
sequence diagram parallel thread fragment example
par info A->B:info1 thread test A->B:info2 thread test A->B:info2 end
sequence diagram parallel fragment example
par info A->C:info A->B:info end
sequence diagram group fragment example
group own name A->B:info end group own name [some text] A->B:info end
sequence diagram expandable fragment example
A->B:info1 expandable- info 1234567890 B->C:info2 C->D:info3 D->E:info4 end E->F:info5 expandable+ info qwertyurtyuiortyuioasdfghjkwertyuio B->C:info2 C->D:info3 D->E:info4 end

Participant Groups

sequence diagram participant group example
participantgroup #lightgreen **Group 1** participant A participant B end participantgroup #lightblue **Long\nname** participant C end B->C:info note over A,B:info
sequence diagram nested participant group example
participantgroup #lightgreen **Group 1** participantgroup #grey sub1 participant A end participantgroup #pink sub2 participant B end end participantgroup #lightblue **Long\nname** participant C end B->C:info note over A,B:info
sequence diagram border styling participant group example
participantgroup #lightgreen #blue:3 Name1 participant Bob1 participant Bob2 end participantgroup #lightblue :2 Name2 participant Alice1 participant Alice2 end participantgroup #pink :0 Name3 participant Bob3 participant Bob4 end participantgroup :0 Name4 participant Bob5 participant Bob6 end Bob1->Bob2:info Alice1->Alice2:info Bob3->Bob4:info Bob5->Bob6:info

Links

sequence diagram link example
A->B:This text contains a <link:http://example.com>link</link> note right of B:Here is <link:https://www.w3schools.com>another link</link>
sequence diagram participant link example
participant "Participant with a <link:http://example.com>link</link>" as Alice Alice->Bob:info

Frame

sequence diagram frame example
frame Example Diagram A->B:info C->A: info note over B,C:info
sequence diagram frame example
frame #red Example Diagram A->B:info C->A: info note over B,C:info

Text Styling

sequence diagram text styling example
box over A:**some bold text** box over A://some italic text// box over A:--some small text-- box over A:++some big text++ box over A:++**Big and bold\nlines of text**++\n//--italic and small--//
sequence diagram text styling color example
participant "Al<color:#red>ice</color>//**Long** ++name++//" as Alice box over Alice:Com<color:#00ff00>binations:\n++**Big and bold green\nlines of text**++\n//--ital</color>ic and small--//\n++Writing C\+\+ in big text using \ to escape +++
sequence diagram text styling example
note over A:""This is mono spaced""
sequence diagram text styling example
note over Bob:<size:20>infoinfo</size><size:10>infoinfo</size>
sequence diagram text styling example
note over Alice:<align:left>infoinfoinfo\ninfo</align> note over Alice:<align:center>infoinfoinfo\ninfo</align> note over Alice:<align:right>infoinfoinfo\ninfo</align>
sequence diagram text styling position example
participant AAAAAAAAAA participant BBBBBBBBBB participant CCCCCCCCCC AAAAAAAAAA->CCCCCCCCCC:<position:left>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<position:center>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<position:right>info info info\ninfo messagestyle <position:left> AAAAAAAAAA->CCCCCCCCCC:<align:left>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:center>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:right>info info info\ninfo messagestyle <position:center> AAAAAAAAAA->CCCCCCCCCC:<align:left>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:center>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:right>info info info\ninfo messagestyle <position:right> AAAAAAAAAA->CCCCCCCCCC:<align:left>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:center>info info info\ninfo AAAAAAAAAA->CCCCCCCCCC:<align:right>info info info\ninfo
sequence diagram text styling strikethrough example
participant "Long ~~strikethrough~~ name" as Alice Alice->Bob:Click and ~~drag to create a request~~ or\ntype it in the source area to the left
sequence diagram text styling stroke example
participantgroup #gray <color:#white>Group</color> participant A participant B end A->B:<stroke:1.5:#white><color:#black>stroke text 1</color></stroke> A->B:<stroke:1:#lightgreen><color:#white>++**stroke text 2**++</color></stroke>
sequence diagram text styling background example
participant "<background:#yellow>AAAAAAAAAA</background>" as A participant B A->B:<background:#yellow>background</background> no background
sequence diagram text styling difference example
participantgroup #darkblue participant AAAAAAAAAAAAAA end participantgroup #black participant CCCCCCCCCCCCCC end AAAAAAAAAAAAAA->CCCCCCCCCCCCCC:<difference><color:#white>abcdefghijklmnopqrstuvwxy</color></difference>
sequence diagram text styling word wrap example
note over A:info info info info <wordwrap:10>wrap10 info info info info info info <wordwrap:20>wrap20 info info\nmanual\nmanual\nmanual info info info info </wordwrap>info info info </wordwrap>info info info info info ==<wordwrap:1><align:center>info info info </wordwrap>info info info info</align>==

Entity Styling

sequence diagram entity styling text example
participantstyle <color:#orange><wordwrap:25>//** notestyle <color:#blue><wordwrap:25>//** messagestyle <color:#green><wordwrap:25>//** actor "Long Actor" as Actor participant "Long test" as test Actor->test:info info ++info++ info info info note over Actor:info info</color> info info info info info

Colors

sequence diagram color participants example
participant A#red database B#green
sequence diagram color divider example
participant A participant B participant C participant D ==info==#lightgreen
sequence diagram color boxes and notes example
note over A#yellow:info rbox over A#violet:info abox right of A#steelblue:info
sequence diagram color messages example
A-#red>B:info A<#green--B:info A--#blue>>B:info
sequence diagram color activations example
participant A participant B activate A #00ee77 A->B:info activate B #red B->B:info activate B #lightgray deactivateafter B
sequence diagram color fragment example
loop #ff00ff info 1234567890 B->C:info2 C->D:info3 D->E:info4 end
sequence diagram label color fragment example
group #2f2e7b label text #white [condition] A->B:info end loop #2f2e7b #white condition A->B:info end

Active Color

sequence diagram active color example
participant B participant C participant D activecolor #red activecolor C #blue activate B B->C:info activate C C->>D:info activate D B<--C:info deactivate C deactivate B B<-D:callback activate C deactivate D activate B B->D:info deactivate B B<-D:info activate B #green

Fonts

sequence diagram font example
fontfamily mono participant A note over A:This is mono spaces

Automatic Numbering

sequence diagram automatic number example
autonumber 1 A->B:info B->B:info autonumber 10 C->D:info A<-B:info A->B:info autonumber off B->C:info C->D:info

Linear Messages

sequence diagram linear messages example
linear A->B:info B->C:info C->D:info C<--D:info B<--C:info A<--B:info A->>B:info B->>C:info linear off C->>D:info

Parallel

sequence diagram parallel example
parallel A<<-B:info B->C:info note left of D:info parallel off C->>D:info

Participant Spacing

sequence diagram participant spacing example
participantspacing equal participant A participant B participant C A->B:info info info

Entry Spacing

sequence diagram entry spacing example
entryspacing 0.1 A->B:info A->B:info entryspacing 3 A->B:info entryspacing 1 A->B:info A->B:info

Life Line Style

sequence diagram life line style example
participant A participant B participant C participant D lifelinestyle #red:4:solid lifelinestyle B #black:1:dashed lifelinestyle C #gray:1:solid lifelinestyle D ::dashed A->B:info B->C:info C->D:info

Large Example

sequence diagram example
Source too large to display