Fundamentals 5 min read

Quickly Create UML Diagrams in IntelliJ IDEA with PlantUML and Graphviz

This guide shows how to install and configure the PlantUML plugin and Graphviz on Windows, enabling Java developers to draw flowcharts and UML class diagrams directly within IntelliJ IDEA, with optional Chrome extension for browser‑based editing.

Open Source Linux
Open Source Linux
Open Source Linux
Quickly Create UML Diagrams in IntelliJ IDEA with PlantUML and Graphviz

Many developers wonder how to draw flowcharts or UML class diagrams; this article introduces the PlantUML plugin for IntelliJ IDEA to quickly create such diagrams.

What is PlantUML

PlantUML is an open‑source project that provides a simple textual language for describing UML relationships and uses the powerful Graphviz rendering engine to generate diagrams, which can be exported as PNG or SVG files.

Advantages of PlantUML

Fully text‑based editing without drag‑and‑drop, automatically adjusts element spacing, and produces clean visuals.

Platform‑independent; any system with the PlantUML JAR can generate diagrams.

Integrates with many editors and IDEs such as IntelliJ IDEA, Eclipse, and Notepad++.

As a Java developer, IntelliJ IDEA is often the preferred IDE, so the following steps focus on using PlantUML within IDEA.

Installing the PlantUML Plugin in IDEA

Navigate to File → Settings → Plugins, search for "PlantUML", locate the "PlantUML integration" entry, and install it.

Installing Graphviz on Windows

Download the installer from the official site:

https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi

After installation, configure environment variables:

Add a variable GRAPHVIZ_HOME with the installation path (e.g., D:\WorkWare\Graphviz2.38) and append %GRAPHVIZ_HOME%\bin to the Path variable. Also set GRAPHVIZ_DOT to %GRAPHVIZ_HOME%\bin\dot.exe.

Verify the configuration by opening a Windows command prompt and running dot -version; the version information should be displayed.

Configuring Graphviz in IDEA

Go to File → Settings → Other Settings → PlantUML and set the Graphviz path accordingly.

Using PlantUML to Draw Flowcharts

Create a new .uml file in IDEA and start writing PlantUML code.

Example code:

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

The right pane shows a live preview of the diagram.

You can also generate UML class diagrams from existing code.

Other Options

If you prefer not to install Graphviz, you can use the Chrome extension "PlantUML Viewer" to edit PlantUML text directly in the browser and view diagrams instantly.

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 IDEAGraphvizDiagram Tutorial
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

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.