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 : createsHow to use this tool
- Add classes with distinct IDs. Enter fields and methods on separate lines and choose a stereotype where it adds meaning.
- Connect the classes using the relationship type that matches the design. Add endpoint multiplicities when they matter.
- Preview the model, check arrow direction, and copy the source into the document that explains the implementation.
What to check
| Detail | Guidance |
|---|---|
| Visibility | Use member prefixes such as + for public and - for private. Keep the notation consistent across classes. |
| Relationship choice | Inheritance, composition, aggregation, and dependency are different claims. A convenient arrow should not replace a design decision. |
| Scope | This 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.