PlantUML is an open source tool where you can specify your UML diagrams in a text format, which looks quite similar to a simple programming language. It is often used by software developers and enables users with accessibility needs to draw UML diagrams.

Although there are other text formats for UML modelling, Plant UML is one of the most popular formats: It supports many diagram types, automatically lays out your diagram elements, and has a simple, human-readable language.

PlantUML uses the Graphviz software to layout your diagram where the layout algorithm aims connectors in the same direction (top to bottom, or left to right) and attempts to avoid crossed or connectors to make the diagram more readable. Graphviz DOT code can also be used to create flow charts, graphs and more. allows you to insert PlantUML and Graphviz DOT code and automatically adds an image with your diagram to the drawing area.

Note: for Confluence Server and data center do not support PlantUML.

Insert a PlantUML diagram in

  1. Open a diagram or create a new blank diagram, and select Arrange > Insert > Advanced > PlantUML from the menu.
  2. Paste your PlantUML code into the dialog and click Insert.

By default, your UML diagram will be inserted as SVG on a transparent background. This is easily resizable and movable, like all other shapes.

Three different formats

When you insert your PlantUML code, you can select from three different image formats. By default, will insert a scaleable SVG on a transparent background (left). You can also choose to insert a PNG image of your UML diagram on a white background (middle), or a text representation on a transparent background (right).

Example PlantUML diagrams

PlantUML supports many different types of UML diagrams. For a comprehensive description, please refer to the PlantUML language reference (PDF) or their main website

For example, lets have a look at a sequence, use case and activity diagrams and the PlantUML code that created them

actor User
User -> Sales: ProcessOrder
  activate Sales
  Sales -> Warehouse: << packOrder >>
    activate Warehouse
    Warehouse -> Picker: GetProducts
      activate Picker
      Picker --> Warehouse: ProductsCollected
      deactivate Picker
    Warehouse --> Sales: OrderPacked
    deactivate Warehouse
  Sales -> Sales: SendOrder
  Sales -> User: OrderSent
  deactivate Sales
left to right direction
skinparam packageStyle rectangle
actor User
actor Sales
rectangle order {
  User --> (checkout)
  (checkout) .> (payment) : include
  (processOrder) .> (checkout) : extends (checkout)
  (processOrder) <-- Sales
(*) --> "Order Submitted"
if "Payment Accepted" then
  -->[yes] "Pack products"
  --> "Send parcel"
  -right-> (*)
  ->[no] "Send error message"
  -->[Cancel Order] (*)

Trees, graphs and more

You aren’t limited to UML diagrams. The Graphviz DOT language allows you to create all kinds of complex diagrams including trees, graphs, entity relationships, data flow diagrams and finite state machines.

DOT and PlantUML allow you to format your diagrams too, with colors, fonts and shapes. For example, the following DOT code creates a tree with colored rectangular nodes instead of black ovals.

digraph UMLdiagrams {
node [color=Red,shape=box]
 UML -> Structure;
 UML -> Behavior;
   Structure -> {Package Class Deployment Object Component CompositeStructure};
   Behavior -> {Activity UseCase State Sequence Interaction};
     Interaction -> {Timing Communication InteractionOverview};

Add a PlantUML or DOT diagram to a Confluence page without

If you don’t have or run Confluence Server or Data Center, you’ll need a third-party app to provide PlantUML functionality. Note that is not the vendor of the PlantUML Diagrams for Confluence app.

When you edit a page, insert a {plantuml} macro. Once inserted you will see a macro box that says “PlantUML for Confluence”. Click the macro and press “Edit”.

In the Macro editor, enter the filename for the image attachment and the width and height that you want the image to be displayed in your Confluence page. Then enter your PlantUML or DOT code, and you will see a preview on the right of the dialog.

Save the macro configuration, and then save your page to see the diagram.

This Confluence app stores both the text description and the resulting image output in your Confluence instance, not on the vendor’s servers.

Learn more about UML diagramming

UML diagrams are used throughout the software development industry, to model business processes and in many other situations. There are 14 different types of UML diagrams (as you can see in the DOT diagram above!). Start with this overview of all UML diagrams, and from there, jump to our in-depth posts on each type.