UML class diagram tool

Draw a UML class diagram: classes with their attributes and methods, interfaces and enumerations, joined by inheritance, composition, aggregation and association arrows. It opens with a small shop's domain model to change into your own.

UML class diagram of a shop: a Customer places Orders, each made of OrderLines for Products, with an OrderStatus enumeration, and paid with a PaymentMethod interface that CreditCard and PayPal implement
The shop's domain model it opens with: attributes and methods, an enumeration, and an interface with two implementations.

Type a class

Double-click a class and type: its name on the first line, then its attributes, a line with "--", and its methods. Enter adds a line, Ctrl+Enter finishes, and the class grows to fit.

  • + public, - private, # protected, ~ package: "+id: UUID", "-save(): void"
  • A $ at the end underlines a static member, a * sets an abstract one in italics
  • "<<interface>> PaymentMethod" or "<<enumeration>> OrderStatus" puts a stereotype above the name
  • A name ending in * is an abstract class

Relationships

Connect two classes and choose the ends under Start and End in the format panel:

  • Triangle: inheritance (a dashed line makes it the realization of an interface)
  • Diamond: composition, at the whole
  • Open diamond: aggregation, at the whole
  • Open arrow: an association; dashed, a dependency

A connector drawn between two classes starts as an association. Write multiplicities and roles, such as "1..*", in its label.

Interfaces and enumerations

The toolbar has a class, an interface and an enumeration ready to place. An enumeration's lines are its values.

Questions

Can it generate code or read my code?

No: it is a drawing tool. Type the classes you want to show; leaving out what doesn't matter usually makes the clearer diagram.

Can I show a class without its members?

Yes: give it just a name, and its compartments stay thin, as UML draws them.

Can I export it?

Yes: as PNG or SVG for documentation, as a .leandevkit file to open and edit again later, or as a Mermaid classDiagram (Export → Copy as Mermaid) for a README.

More tools