UML diagrams are standardized visual models of a software system. UML stands for Unified Modeling Language, a shared set of shapes, lines and rules for drawing how a system is structured and how it behaves, so that anyone who knows the notation can read the diagram the same way.
A UML diagram might show the classes in a codebase and how they relate, the messages two services exchange during a login, the states an order passes through from "placed" to "delivered," or the actions a user can take in an app. Different diagram types answer different questions, but they all share one vocabulary.
That shared vocabulary is the point. Before UML, every team drew boxes and arrows a little differently, and every diagram needed a legend. UML, created in the mid-1990s by Grady Booch, Ivar Jacobson and James Rumbaugh and standardized by the Object Management Group in 1997, gave software teams a common language.
Today it's used for designing systems, documenting them, onboarding engineers and communicating with non-technical stakeholders.
UML defines 14 diagram types, split into two families. In practice, most teams use five or six regularly.
Structural diagrams show the static parts of a system and how they relate.
Class diagram. The most widely used UML diagram. Each box is a class with its attributes and methods; lines between boxes show inheritance, association, aggregation and composition. Use it to design or document an object model or database schema. Start from the UML class diagram template →
Component diagram. Shows the high-level pieces of a system (services, libraries, modules) and the interfaces between them. Good for architecture overviews.
Deployment diagram. Maps software components onto the hardware or infrastructure they run on: servers, containers, devices, networks.
Object diagram. A snapshot of specific instances of classes at one moment in time. Useful for explaining a tricky data scenario.
Package diagram. Groups classes into packages or namespaces and shows dependencies between them.
Composite structure and profile diagrams round out the family but are rarely used outside formal modeling.
Behavioral diagrams show how the system acts over time and how its parts interact.
Use case diagram. Shows the actors (users, external systems) and the goals they can accomplish with the system. It's the "who can do what" view, ideal for scoping a product or feature. Start from the UML use case diagram template →
Sequence diagram. Shows how objects or services exchange messages over time: each participant gets a vertical lifeline, and horizontal arrows show calls and responses in order. The go-to diagram for API flows, authentication and any multi-step interaction. Start from the UML sequence diagram template →
Activity diagram. UML's version of a flowchart: actions, decisions, parallel branches and merges that describe a workflow or algorithm. Use it for business processes and the logic inside a single operation. Start from the UML activity diagram template →
State machine diagram. Shows the states an object can be in and the events that move it between them, such as an order going from Pending to Paid to Shipped, or a UI component going from Idle to Loading to Error. Start from the UML state diagram template →
Communication, timing and interaction overview diagrams are more specialized variants of the above.
Which one to reach for: if you're explaining structure, start with a class diagram. If you're explaining a process, start with a sequence diagram (for interactions between parts) or an activity diagram (for the steps themselves). Use case diagrams belong at the very start of a project; state diagrams whenever something has a lifecycle.
Each diagram type has its own notation, but a small set of symbols covers most of what you'll draw.
Symbol | Looks like | Meaning |
|---|---|---|
Class | Rectangle split into 3 sections | Name / attributes / methods |
Actor | Stick figure | A user or external system |
Use case | Oval | A goal an actor can achieve |
Object / lifeline | Rectangle with a dashed vertical line | A participant in a sequence diagram, over time |
Message | Solid arrow (sync) or open-headed arrow (async) | A call between participants; dashed arrow = return |
Activation bar | Thin rectangle on a lifeline | The participant is doing work |
State | Rounded rectangle | A condition an object can be in |
Initial / final state | Filled circle / filled circle in a ring | Where a lifecycle starts and ends |
Action | Rounded rectangle (activity diagram) | A step in a workflow |
Decision / merge | Diamond | A branch or rejoin in flow |
Fork / join | Thick horizontal bar | Parallel paths split or rejoin |
Association | Plain line | Two classes are related |
Inheritance | Line with hollow triangle | "Is a": a subclass extends a superclass |
Aggregation | Line with hollow diamond | "Has a": a whole made of parts that can exist alone |
Composition | Line with filled diamond | "Owns a": parts that don't exist without the whole |
Dependency | Dashed arrow | One element uses another |
Multiplicity |
| How many instances relate |
Whimsical's shape and connector libraries cover all of these: class boxes with sections, ovals and stick-figure icons, diamonds and pill shapes, and connector endpoints for arrows, hollow and filled diamonds, triangles and the 0..1 / 1..* multiplicity markers used in class diagrams.
The fastest way to get a first draft is to describe the system in plain language and let Whimsical AI draw it. Copy any of these prompts, swap in your own names, and paste it into Whimsical AI.
Tip: name the diagram type, list the elements, then describe the relationships one per sentence. The more literal the prompt, the closer the first draft. You can always refine by hand afterwards.
Whimsical is built for exactly this kind of diagramming: fast enough to sketch in a design review, precise enough to document with.
1, *, 0..1) at connector ends and role names along lines. Use text labels on messages in sequence diagrams.Generate from text. Describe the system in plain language, such as "a class diagram for a library with Books, Members and Loans," and Whimsical AI drafts the diagram for you to refine. Whimsical also accepts Mermaid syntax, so if you already write classDiagram or sequenceDiagram blocks in your docs, paste them in and get an editable board.
OrderService, not "the order thing." Diagrams that match the codebase stay useful.A standardized visual model of a software system, drawn using the Unified Modeling Language notation. It can show structure (classes, components) or behavior (interactions, workflows, states).
Fourteen in total, split into structural (class, component, deployment, object, package and others) and behavioral (use case, sequence, activity, state machine and others). Class, sequence, use case, activity and state diagrams are the most common.
Designing software before it's built, documenting systems that exist, communicating architecture across teams and onboarding engineers.
Not exactly. UML's activity diagram is closely related to a flowchart and uses similar shapes, but it follows UML's formal notation and adds concepts like parallel forks and swimlanes.
No. Most teams use a handful of diagram types and a small subset of the notation. Start with the symbols in the cheat sheet above.
Yes. Whimsical's free plan includes boards, the sequence diagram tool and all the UML templates linked in this article.