Quickly Create UML Diagrams in IntelliJ IDEA with PlantUML
This guide shows how to install and configure the PlantUML plugin and Graphviz on Windows, set up environment variables, and use simple text syntax to generate UML sequence and class diagrams directly within IntelliJ IDEA, plus an alternative Chrome extension.
What is PlantUML
PlantUML is an open‑source tool that lets you describe UML diagrams with a simple text language. It uses the Graphviz rendering engine to generate PNG, SVG or other image formats.
Key Advantages
Pure text editing – no drag‑and‑drop, automatic layout and clean syntax.
Platform‑independent – works as long as the PlantUML JAR is available.
Integrates with many editors and IDEs such as IntelliJ IDEA, Eclipse, Notepad++.
Installing the PlantUML Plugin in IntelliJ IDEA
Open File → Settings → Plugins, search for “PlantUML”, locate “PlantUML integration” and click Install.
Installing Graphviz
Download the Windows installer from the official site:
https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi
After installation, add the following environment variables:
GRAPHVIZ_HOME = D:\WorkWare\Graphviz2.38
Path = %GRAPHVIZ_HOME%\bin
GRAPHVIZ_DOT = %GRAPHVIZ_HOME%\bin\dot.exeVerify the setup by running dot -version in a command prompt; the version information should be displayed.
Configure PlantUML in IDEA
Go to File → Settings → Other Settings → PlantUML and ensure the path to the Graphviz dot executable is correct.
Creating a Simple Sequence Diagram
Create a new .uml file and write the following text:
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@endumlThe right‑hand pane shows the rendered diagram instantly.
Generating a UML Class Diagram
You can also write class definitions in the same file; PlantUML will produce a class diagram.
Alternative Without Graphviz
If you prefer not to install Graphviz, you can use the Chrome extension “PlantUML Viewer”, which renders diagrams directly in the browser from the text source.
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.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
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.
