PlantUML: Text-Based UML Diagramming 10x Faster Than Visio
This guide introduces PlantUML, an open-source text-based UML diagramming tool, covering its advantages, installation in IntelliJ IDEA, Graphviz setup with environment variables, configuration steps, and practical examples for creating flowcharts and class diagrams, plus a browser-based alternative.
What Is PlantUML
PlantUML is an open-source project that enables rapid diagramming through a textual description language. It defines a complete language for describing UML relationships and uses the Graphviz rendering library to generate diagrams, which can be exported as images or SVG vector files.
Advantages of PlantUML
Pure text-based editing — no drag-and-drop, automatic layout adjustment, simple and clean.
Platform-independent — runs anywhere with the PlantUML JAR, no platform lock-in.
Integrates with multiple editors and IDEs such as IntelliJ IDEA, Eclipse, and Notepad++.
Installing the PlantUML Plugin in IntelliJ IDEA
Open File → Settings → Plugins, search for PlantUML , and install PlantUML integration .
Installing Graphviz
PlantUML relies on Graphviz for rendering. Download the Windows installer from:
https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msiAfter installation, configure environment variables:
Add GRAPHVIZ_HOME with the installation path (e.g., D:\WorkWare\Graphviz2.38).
Append %GRAPHVIZ_HOME%\bin to the Path variable (separate entries with semicolons).
Add GRAPHVIZ_DOT pointing to %GRAPHVIZ_HOME%\bin\dot.exe.
Verify the installation by opening a command prompt and running dot -version; a version output confirms success.
Configuring Graphviz in IntelliJ IDEA
Navigate to File → Settings → Other Settings → PlantUML and ensure the Graphviz dot executable is detected.
Drawing a Flowchart with PlantUML
Create a new .uml file in IDEA and paste the following PlantUML code:
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@endumlThe right-hand preview pane renders the sequence diagram in real time.
Generating UML Class Diagrams
PlantUML can also produce class diagrams from existing code. The article references a previous guide on using IDEA's built-in feature to generate UML class diagrams from project code with one click.
Alternative: Browser-Based PlantUML Viewer
If you prefer not to install Graphviz, you can use the Chrome extension PlantUML Viewer . After installation, edit PlantUML text directly in the browser and see the diagram rendered instantly.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architect's Guide
Dedicated to sharing programmer-architect skills—Java backend, system, microservice, and distributed architectures—to help you become a senior architect.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
