Tools / Editor

Class Diagram Online: UML Builder

Build a class diagram with attributes, methods and relationships. Choose multiplicities and generate editable Mermaid source in your browser.

Define the model before adding members

Build a class diagram online to explain types, their members, and the relationships between them. Use it for a design discussion or a small domain model. Start with responsibilities and dependencies, then add only the fields and operations needed to answer the design question.

A worked example

Diagram source

classDiagram
  direction TB
  class User {
    +String name
    +String email
    +login()
  }
  class Session {
    +String token
    +refresh()
  }
  User "1" --> "*" Session : creates
User and Session illustrate a one-to-many relationship. Attributes describe stored information; login and refresh describe operations. The diagram documents a design rather than generating executable classes.

How to use this tool

  1. Add classes with distinct IDs. Enter fields and methods on separate lines and choose a stereotype where it adds meaning.
  2. Connect the classes using the relationship type that matches the design. Add endpoint multiplicities when they matter.
  3. Preview the model, check arrow direction, and copy the source into the document that explains the implementation.

What to check

DetailGuidance
VisibilityUse member prefixes such as + for public and - for private. Keep the notation consistent across classes.
Relationship choiceInheritance, composition, aggregation, and dependency are different claims. A convenient arrow should not replace a design decision.
ScopeThis is a diagram builder, not code analysis. It does not inspect a repository or verify that classes in source code match the model.

Common questions

Should I include every method?

Usually not. A review diagram is easier to read when it includes the members relevant to the decision. Keep detailed API documentation separate and update the model when important relationships change.