Fundamentals 4 min read

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.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Quickly Create UML Diagrams in IntelliJ IDEA with PlantUML

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.exe

Verify the setup by running dot -version in a command prompt; the version information should be displayed.

Graphviz environment variable verification
Graphviz environment variable verification

Configure PlantUML in IDEA

Go to File → Settings → Other Settings → PlantUML and ensure the path to the Graphviz dot executable is correct.

IDEA PlantUML settings
IDEA PlantUML settings

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
@enduml

The right‑hand pane shows the rendered diagram instantly.

Rendered sequence diagram
Rendered sequence diagram

Generating a UML Class Diagram

You can also write class definitions in the same file; PlantUML will produce a class diagram.

UML class diagram example
UML class diagram example

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.

PlantUML Viewer Chrome extension
PlantUML Viewer Chrome extension
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PlantUMLUMLIntelliJ IDEATutorialGraphvizDiagram
Liangxu Linux
Written by

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.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.