PlantUML
Last updated
Was this helpful?
Last updated
Was this helpful?
PlantUML is a tool that allows users to define UML diagrams using a plain text description. It generates visual diagrams from these descriptions, making it a preferred choice for software developers and documentation writers.
Text-Based UML: Diagrams are written in plain text and converted into images.
Supports Multiple UML Diagrams: Class, Sequence, Use Case, State, Activity, and more.
Integration with Code and Documentation: Works with Markdown, AsciiDoc, LaTeX, etc.
Automation and Version Control: Easy to track changes in diagrams using Git.
Cross-Platform: Works on Windows, macOS, and Linux.
Lightweight and Fast: Requires minimal system resources.
PlantUML requires Java (JDK 8 or higher) to run. It can be used in different ways:
Install Java (if not installed).
Download the PlantUML JAR file from .
Run it using:
PlantUML Online Server
Install the PlantUML extension from the VS Code marketplace.
Install Graphviz (needed for rendering):
Create a .puml
file and start writing UML diagrams!
Install the PlantUML Integration plugin from the IntelliJ Plugin Marketplace.
Create a New PlantUML File
Open IntelliJ IDEA project.
Right-click on the src
or desired directory.
Select New → File.
Name the file diagram.puml (or any .puml
extension).
PlantUML supports almost all major UML diagram types:
Diagram Type
Description
Example Syntax
Class Diagram
Represents classes and their relationships
class User { +name: String }
Sequence Diagram
Shows interaction between objects over time
Alice -> Bob: Hello
Use Case Diagram
Represents system functionalities and user interactions
User -> (Login)
Activity Diagram
Models workflows and decision-making
start --> if (Condition?) then
State Diagram
Shows state transitions in a system
[*] --> Active
Component Diagram
Represents system components and dependencies
component Database
Deployment Diagram
Shows hardware and software deployment
node Server { component App }
Object Diagram
Represents instances of classes at runtime
object user1: User
(supports multiple diagram types)
Refer to the official diagram for more details on the supported type -