Skip to content

Guide

PlantUML UML guide

Learn the PlantUML basics that matter for documentation, then preview, export, or embed UML diagrams in markdown documents.

Key benefits

  • Document behaviour with sequence diagrams
  • Explain system structure with class and component diagrams
  • Preview PlantUML without local Java setup
  • Export diagrams separately or embed them in Word documents

Start with the PlantUML document wrapper

PlantUML diagrams begin with @startuml and end with @enduml. Everything between those lines describes the diagram. This wrapper makes the source portable across tools and easy to store in markdown, tickets, architecture docs, or repositories.

Markdownyi lets you write and preview PlantUML source in the UML editor. You can also keep PlantUML blocks inside markdown when you want prose and diagrams to export together.

Sequence diagrams for behaviour

Use sequence diagrams when you need to show messages between users, services, APIs, queues, or databases. Define participants, then use arrows to show calls, responses, retries, and error paths.

Good sequence diagrams are narrow and chronological. If the flow has too many branches, create one diagram for the happy path and a separate diagram for failures or edge cases.

  • Use actor for users or external systems
  • Use participant for services and applications
  • Use arrows to show request and response direction
  • Add notes for auth, validation, or important side effects

Class and component diagrams for structure

Class diagrams describe domain models, interfaces, relationships, and inheritance. Component diagrams describe higher-level building blocks such as apps, services, databases, queues, and third-party systems.

For documentation, do not try to model every field or method. Focus on the relationships that help a reviewer understand the system. Detailed implementation belongs in code, while diagrams should explain structure and boundaries.

Preview, export, and embed

Use the Markdownyi UML editor to preview PlantUML quickly, zoom into the result, and export SVG, PNG, or PDF. For architecture specs, you can also embed PlantUML source in markdown and export the full document to Word.

Choose SVG for crisp diagrams in docs and slides, PNG for broad compatibility, PDF for formal attachments, and Word export when the diagram belongs inside a larger written spec.

More about PlantUML UML guide

This PlantUML guide focuses on formal UML and architecture documentation: sequence diagrams for behaviour, class diagrams for models, and component diagrams for system boundaries.

Use PlantUML for precision

PlantUML is a good fit when you need stricter UML notation, C4-style architecture views, or repeatable technical diagrams.

Keep diagrams readable

Avoid modelling every implementation detail. A useful UML diagram explains a decision, a boundary, or a relationship clearly.

Export strategy

Use SVG or PNG for standalone visuals, PDF for attachments, and markdown-to-Word export when diagrams belong in a larger spec.

How to get started

  1. 1

    Write PlantUML source

    Start with @startuml and describe the diagram using participants, classes, or components.

  2. 2

    Preview and simplify

    Check readability, split large diagrams, and keep only the relationships that matter.

  3. 3

    Export or embed

    Download SVG, PNG, or PDF, or keep the source inside markdown for Word export.

Frequently asked questions

Use PlantUML for more formal UML notation and Mermaid for quick lightweight diagrams. Markdownyi supports both workflows.

Ready to try it?

Create a free account and export your first document in minutes.

Create free account