Markdown ZenUML sequence maker

Draw a sequence diagram by writing it as code: name your participants, then write each call and return, and ZenUML lays out the lifelines, arrows and activation bars. Free in your browser, no sign-up.

ZenUML sequence syntax

A ZenUML block starts with the word zenuml. You list your participants, then write the story as calls between them. A call reads like code: one object calls a method on another, and the body of that call goes in braces. Here is each piece you can write.

Participants and messages

Declare a participant with a stereotype like @Actor or @Database, then send a plain message with A->B: text.

You write
zenuml
  @Actor Customer
  @Boundary Web
  Customer->Web: open page
  Web->Customer: show form
You get

Synchronous calls and returns

Write a method call as A->B.method(). Put the work it triggers in braces, and end with return value to send a result back.

You write
zenuml
  @Actor Customer
  @Boundary Web
  @Control OrderService
  Customer->Web.checkout() {
    Web->OrderService.create() {
      return orderId
    }
    return page
  }
You get

Creating an object

Write new B to create an object, or x = new B() to name the thing you made.

You write
zenuml
  @Control OrderService
  OrderService->OrderService.build() {
    order = new Order()
    return order
  }
You get

Cheat sheet

Write this You get
zenumlStart a ZenUML sequence
title TextTitle the diagram
@Actor NameA participant drawn as an actor
@Boundary NameA boundary (edge of the system)
@Control NameA control (coordinating logic)
@Entity NameAn entity (a thing being worked on)
@Database NameA database
@Queue NameA message queue
A->B: textA plain message from A to B
A->B.method()A synchronous call to B.method()
A->B.method() { … }A call whose body is the nested messages
return valueReturn a result from the current call
A->A: textA self message
new BCreate an object of B
x = new B()Create B and name it x

Something not working? Let us know.