Create UML diagrams by writing text

Published on Monday, October 19, 2020

PlantUML is an open-source tool that allows users to create UML and other diagrams from plain text.

PlantUML uses light, easily readable, well-formatted code to create diagrams. Graphviz, an open-source tool for drawing graphs, is required for using Plant UML.

PlantUML, similar to MarkDown, can be used on various platforms like Microsoft Word, Visual Studio Code, and Jet Brains Rider and can even be integrated into forums and wikis.

Due to the plain text nature of the PlantUML, it is easy to track who did what and when with source control.

Text-based Tools or GUI Tools?

What is easier? To draw diagrams with a mouse in GUI or to type like a pro?

why not both

Is it wrong to use great GUI tools, text-based ones, paper, sticky notes, and color markers?

Tools like ( are great simple free tools with extensive drawing possibilities for flowcharts, infographics, UML, etc. I find this approach much more creative for some tasks than just looking at a text and auto-generated preview. Especially in the preparation phase, when you have to reorganize your thoughts, working with pen and paper and GUI tools is more productive.

"Hand-drawn diagrams just speak to me."

On the other hand, documentation and collaboration are much easier to do with plain text-based graphs. Everything is much stricter, formats and standards need to be followed, and changes can be easily tracked with source control tools. PlantUML can easily be used with MarkDown style documentation.

UML Diagrams

At the moment following UML Diagrams are supported:

  • Sequence diagram
  • Use Case diagram
  • Class diagram
  • Activity diagram
  • Component diagram
  • State diagram
  • Object diagram
  • Deployment diagram
  • Timing diagram

Check the official documentation for more detailed info.

PlantUML - Support for Non-UML Diagrams

PlantUML supports many more interesting non-UML diagrams like:

  • Wireframe graphical interface - Salt is PlantUML's subproject that can create mockups of websites, apps, etc. There are many specialized components, like buttons, radio buttons, checkboxes, text areas, droplists, trees, tables, tabs, menus, etc. But do you want to use plain text for mocking interfaces?
  • Archimate diagram - New Diagram, proposition only.
  • Specification and Description Language - New Activity Diagram, Beta.
  • Ditaa diagram - PlantUML's implementation of ditaa (DIagrams Through Ascii Art), a tool for converting diagrams drawn using ASCII art into bitmap graphics.
  • Gantt diagram - Gant chart type of bar chart that illustrates a project schedule with dependencies between tasks and activities. Very cool if you are into this sort of task organization.
  • MindMap diagram - Mind Map is a chart used to organize information visually. PlantUML syntax for Mind Map is compatible with orgmode.
  • Work Breakdown Structure (WBS) diagram - Simple variation of a famous chart used for breaking down a project into smaller components. Very popular with project management and systems engineering. Maybe we should stop using lists of lists and try WBS?
  • Mathematic with AsciiMath or JLaTeXMath notation - Support for AsciiMath and JLaTeXMath notation in PlantUML.
  • Entity Relationship diagram - Extension of Class Diagram.

During the preparation and tracking stages of project development, I mostly find Mind Maps, WBS, and Gantt Charts useful.