1. UML Diagrams
18 minutesBy Canva Team

Creating a UML diagram: How-tos, templates, and tips

Learn the definition of a UML diagram, its different types, and the notations they use. Get started on visualizing your systems in a UML diagram online using our guide and templates.
Long Form - UML Diagrams Hero Banner (Desktop)
Long Form - UML Diagrams Hero Banner (Mobile)

Jump to:


What is a UML diagram?

UML diagrams are the representation of the UML notation. It consists of standard elements (such as components, classes, and use cases) that are connected using relationships(opens in a new tab or window) (arrows) to represent the architecture, implementation, and structure of an otherwise complex software system.

A simple example of a UML diagram showing the relationships between different actions.

A simple example of a UML diagram showing the relationships between different actions.

UML diagrams most often visualize the following:

  • Components of the system and how they interact with other components
  • The user interface of the system
  • Activities or jobs carried out by the components or interfaces
  • How different entities interact with components and interfaces
  • How the system runs

A UML diagram differs from a UML model, which is the abstract representation of a system. It consists of a combination of different types of UML diagrams and some additional documentation.

Simply put, UML diagrams are the actual representation of the UML language, and one or more UML diagrams make up the UML model.

What is UML?

Unified modeling language (UML), as the name suggests, is a modeling language used to visualize the design of various software and business systems. It uses standard notations for specific processes and participants, making it an ideal modeling language that can be understood universally.

An important distinction to note: UML is not a programming language like Java or C++. These programming languages build systems through code, whereas UML visualizes them like a map. However, through the use of tools, code can still be produced from UML diagrams.

A brief history of UML diagrams

The UML notation was originally created to standardize approaches to software engineering. Developed in 1994-1995, it was adopted by the Object Management Group (OMG) and was accepted as an ISO standard(opens in a new tab or window) in 2005.

UML finds its roots in object-oriented programming(opens in a new tab or window) methods but has slowly extended to other forms of design documentation in business modeling practices, for example. The current version of UML is UML 2.4, and it is continually updated to include fixes to any issues.


Why use UML diagrams?

The widespread adoption and increased usage of UML diagram-maker tools beg the question: What are the benefits of UML diagrams and what are UML diagrams used for?

Typically used in software development, UML diagrams have also found their way to business modeling practices. They offer the benefits of improved communication, collaboration, and system understanding.

Canva has various UML diagram templates you can customize according to your needs.

Canva has various UML diagram templates you can customize according to your needs.

Enhanced visual communication and collaboration

UML diagrams (such as component diagrams and structure diagrams) make it easier for technical and non-technical audiences alike to visually understand the overall architecture of a system. It’s a great complement to system documentation that also simplifies complex structures, thereby enhancing communication, and collaboration.

Popularity

UML is one of the most used tools for visual software design. It has emerged as a standard notation to communicate system and software designs, and its widespread use ensures that it is well understood by most software-related professionals.

Flexibility

UML diagrams can also be customized according to your specific needs. You can modify interactions and modeling elements, create new stereotypes and constraints, and use them not just for software development, but also for most business modeling needs.

resource
Canva for Teams
Store your UML diagram in your team folder in Canva so that various technical and non-technical teams in your organization can easily refer to them and keep themselves in the loop.
Preview of real-time collaboration when you make a UML diagram in our Canva Whiteboard. Together, customize and edit your diagram accordingly.

Preview of real-time collaboration when you make a UML diagram in our Canva Whiteboard. Together, customize and edit your diagram accordingly.

Fraction of learning

While there are over 14 types of UML diagrams, popular ones like the class diagram, use case diagram, structure diagram, and behavioral diagram are the only ones most professionals really need to be aware of. This means that with even just 20% knowledge of the UML language, you can already effectively communicate what you need to.

An abundance of free UML diagram tools

UML diagrams are now more accessible and easier to make thanks to the many UML diagram creator tools available online. With a simple search, you can find anything from free UML software (with simple templates) to paid bespoke solutions (which can generate code from design, reverse engineer code, perform analysis of software solutions, and even mine requirements).


What are the different UML diagram types?

A combination of UML diagrams makes up the UML model. The 14 types of UML diagrams represent the UML model either structurally or behaviorally, as will be discussed below.

Structural UML diagrams

UML structural diagrams represent the static structure of a system. These diagrams use objects, operations, relationships, and attributes to analyze or depict this structure. Under structural UML diagrams are the following types:

There are seven types of diagrams under UML structural diagrams.

There are seven types of diagrams under UML structural diagrams.

A UML class diagram is typically used to visualize a system’s components in object-oriented programming. It represents classes (with their visibility, scopes, signals, data types, packages, interfaces, and objects) and the relationships between these classes. In a more detailed view, these classes can also be split into subclasses.

Used generally for conceptual modeling of an application, UML class diagrams can also be translated easily into programming code, and are also used in data modeling.

UML class diagrams are visualized using the following:

  • Classes: This component consists of a rectangle where the name of the class (its first letter capitalized) is visualized in bold and centered font; the attributes (values that detail an instance of a class) of the class are left aligned with lowercase first letters; and the operations, or the actions that the class can execute, left aligned with lowercase first letters.
  • Relationships between classes: Visualized by a line, which may be dotted or solid depending on whether the relationship is an association, inheritance, realization, dependency, aggregation, or composition.
Class diagram

A UML object diagram is an instance of a class diagram where actual examples are used to demonstrate the system. It represents objects and the relationships between them, which can be useful to create class diagrams, or to verify the accuracy and completeness of a class diagram. Object diagrams are also extensively used in object-oriented programming.

Much like class diagrams, object diagrams are also visualized as follows:

  • Object: A rectangle with the name of the object, separated by a colon from its class and underlined, and the attributes of the object. Unlike classes, object attributes must have values assigned to them.
  • Relationships between objects: Lines that denote association, inheritance, realization, dependency, aggregation, or composition.
Object diagram

A UML component diagram maps the structural relationship of the components of software systems. It visually represents a system’s components (with interfaces and ports) and the relationships between them. Detailed component diagrams make use of subsystems, which inherit the same rules as components.

Component diagrams verify the functionality of a system and act as a communication tool between a system developer and the associated stakeholders.

UML component diagrams are visualized as follows:

  • Component: A rectangle with the name of the component, the icon of the component, and the interfaces of the component.
  • Relationships between components: UML relationship notation for association, inheritance, realization, dependency, aggregation, or composition.
Component diagram

A UML deployment diagram displays how software is implemented on system hardware. The hardware components are called nodes, while the software components are called artifacts. Hence, UML deployment diagrams show the artifacts that run on each node of the system.

Mostly used by system engineers, deployment diagrams help illustrate the view of the system’s hardware arrangement and how software components fit into this topology.

UML deployment diagrams are visualized as follows:

  • Nodes: Visualized as 3D boxes. Nodes can also have subnodes which are displayed as nested boxes.
  • Artifacts that are deployed on the nodes: Rectangles within the node boxes.
  • Relationships between nodes: UML relationship notation for association or dependency.
Deployment diagram

A UML package diagram showcases the structure of packages within a system. A package is a collection of related UML elements (such as classes). Package diagrams are applicable for demonstrating the functionality and layered architecture of a software system, as well as the relationship between these layers.

UML package diagrams are visualized as follows:

  • Packages: Visualized as a rectangle with a tab at the top, like a folder. Packages must have different names and can be a combination of entire diagrams or components.
  • Package name: Can be on the tab or inside the package rectangle.
  • Dependencies between packages: Shown using dotted arrows.
Package diagram

A UML composite structure diagram allows you to take a peek into the internal actions, composition, and relationships of classes. While it is similar to a class diagram, a composite structure diagram goes into further detail by showing interfaces, packages, ports, connectors, and the classification of classes.

Composite structure diagrams find their use in programming practices to showcase how ports and parts of a class interact with each other, and with parts of the outside world.

UML composite structure diagrams are visualized as follows:

  • Classes: Appears as a rectangle with the class name as a compartment at the top of the rectangle.
  • Parts of the class: Represented as rectangles inside the class rectangle. They are named in camel case with the type and multiplicity separated by a colon. For example, "part1: Type [0..2]".
  • Relationships between different classes: Shown with connectors or arrows.
Composite structure diagram

A UML profile diagram can be thought of as an extension of the UML language, as it offers a mechanism to customize UML models. In other words, you can use UML profile diagrams to create new blocks and add properties and semantics to make UML more suited to your specific needs.

Profile diagrams use the following to extend UML:

  • Stereotypes: You can use stereotypes to create new model elements from existing ones. For example, if you need to represent a hub in a networking environment, you can do so by encasing it in double guillemets.
  • Tags: Tags are used to add additional information to a UML element as a keyword value pair. For example, you can specify the version of a component as a tag (version="8.1.0").
  • Constraints: Constraints are used to specify the conditions for a UML element, which can be added in as notes (visualized as a sticky note). For example, you can specify that the age of a student class must be more than 20.
Profile diagram

Behavioral UML diagrams

UML behavioral diagrams represent the behavioral view of the system. These diagrams showcase collaborations between objects, and the states of objects to describe the behavior of the system within itself and with other entities. Below are the different types of behavioral UML diagrams:

A UML use case diagram, as the name suggests, depicts the use case of a system. That is, it displays the possible interactions that a user might have with a system and helps showcase the system from an end-user perspective.

Use case diagrams are employed in software development, business, or business modeling practices to offer non-technical stakeholders a high-level view and the intent of the system. They provide an understanding of how the system will be designed.

UML use case diagrams are visualized as follows:

  • Actor: The participant that interacts with the system, visualized as a stick figure.
  • Use case: An automated or manual system function, named with a verb and depicted as an ellipse. Use cases must be associated with actors.
  • Communication link: Used to show the association between actors and use cases. Shown with arrows.
  • Boundary of the system: Visualized as rectangles. Actors and use cases fall within this boundary.
Use case diagram

A UML activity diagram depicts the activities, actions, and workflows of computational or organizational processes. It’s basically an advanced flowchart that models the flow of operations of a system or organization.

Activity diagrams have different use cases and are usually used in the design of embedded systems to visualize how use cases relate to business workflows.

UML activity diagrams are visualized as follows:

  • Actions: Visualized as rounded rectangles.
  • Decisions: Represented as diamonds.
  • Concurrent activities: Appears as bars.
  • Start of the workflow: Marked by a black circle.
  • Stop of the workflow: Visualized using an encircled black circle.
Activity diagram

A UML sequence diagram displays the sequence required to carry out a functionality. It visualizes the processes and objects involved in the functionality and the sequence of messages exchanged between them.

Sequence diagrams are typically used in software engineering to capture how operations are carried out and how software coding can be done to achieve the use case sequence.

UML sequence diagrams are visualized as follows:

  • Actor: Visualized as a stick figure.
  • Individual participant in the interaction: Appears as a lifeline, which is a dotted line with a rectangle up top.
  • Time between initiation and completion time of the interaction: Depicted as a thin rectangle on the lifeline.
  • Message between two lifelines: Visualized by a text beside an arrow showing the direction where the message is going.
  • Remarks about the elements: Represented using notes.
Sequence diagram

A UML state machine diagram (also called a state diagram) displays how an entity moves from one state to another in response to events. Software systems are typically event-driven, and state machine diagrams showcase how an event changes the state of different components.

State machine diagrams can be useful in software development settings to understand, document, and test the state of an object at some point in time. They are used in conjunction with sequence diagrams.

UML state machine diagrams are visualized as follows:

  • States: Represented as a rounded rectangle with the name compartment at the top, and the activities listed in the bottom compartment.
  • Start of the state diagram: Visualized by a black circle.
  • Stop of the state diagram: Visualized using an encircled black circle.
  • Transitions from one state to another: Appears as arrows.
  • Events that trigger the state transition: Written as text beside the corresponding transition.
State machine diagram

A UML communication diagram is an extension of object diagrams and displays the interaction between objects. Taking its cues from class diagrams, sequence diagrams, and use case diagrams, communication diagrams display both the structure and behavior of a system.

Communication diagrams are similar to sequence diagrams but the former arranges elements according to space while the latter arranges elements according to time. These diagrams are also used in software engineering to identify objects, their classes, and their attributes and visualize the messages passed between these objects.

UML communication diagrams are visualized as follows:

  • Objects: Visualized as rectangular boxes.
  • Messages between objects: Represented by arrows pointing from the sending object to the receiving object. The message text is situated just beside the arrow.
Communication diagram

A UML interaction overview diagram displays the flow of activities between nodes in a system. You can think of it as a combination of activity and sequence diagrams. Each activity in the interaction overview diagram is visualized as a frame, which in turn contains a nested sequence diagram. The visualization used for an interaction overview diagram is the same as that on an activity diagram.

A UML timing diagram is a variant of the interaction diagram and a special form of a sequence diagram. It is used to explore object behavior over a certain period of time. The difference between a timing diagram and a sequence diagram is the reversal of axes. In timing diagrams, the time increases from left to right and the lifelines are shown in separate compartments.

Timing diagrams allow business users to see which steps in a system take a significant amount of time, thus helping improve business processes.

UML timing diagrams are visualized as follows:

  • Individual participant in the interaction: Shown by a lifeline, which is a rectangle with a name. Multiple lifelines can be stacked in the same frame to showcase the interaction between them.
  • States of the interaction: Stacked on the left margin of the lifeline and moved from top to bottom.
Timing diagram

How to make a UML diagram

Despite the myriad of benefits offered, creating a UML diagram still requires a well-thought-out process. How to draw UML diagrams that can effectively represent your system? Read on to find out.

How to make a UML diagram

The UML diagram you create typically depends on the business need, the scope, and the audience. Ask yourself the following questions:

  • What is the business need/purpose of the diagram? What are you trying to convey? Is it to let stakeholders know about the activities of the system? Or will the software development team use it to create the object-oriented programming code of the software?
  • Who is the audience for the diagram and what is their level of technical knowledge?
  • What is the scope and abstraction level required of the diagram? How in-depth do you require the diagram to be?
  • Is there an industry standard UML diagram that is recommended for your particular scenario?
tip
Plan with a team
Choosing which UML diagram to use is crucial, so you’ll want as many perspectives as possible to weigh in on important decisions. They can also provide info that you may otherwise not have.

Once you decide on the types of UML diagrams to create, collect the information you need from all sources available. To do this, you can consult with stakeholders, review existing documentation, conduct interviews, or observe the system that you are trying to capture.

For instance, information about class diagrams might require expertise from software developers, while a UML use case diagram might require information gathering from product designers.

With a host of UML diagram maker tools readily available in the market, gone are the days of drawing UML diagrams by hand.

You can find UML diagram examples for almost every scenario. If you start with a template, you usually get all the required UML symbols and arrows, as well as directions on how you can use these elements in your design. Prefilled templates can help you improve the consistency, efficiency, and quality of your diagram without hours of manual work.

Using your chosen template, build your diagram’s primary structure first before moving on to the complexities and additional information required of your diagram. This prevents your graph from looking messy and overwhelming.

Once you have a foundation, you can start heading into the finer details. Edit or add more shapes, insert text, and connect them with lines and arrows. Remember to use the right symbols and lines for the elements and relationships you’re illustrating.

As you build your diagram, make sure you create a natural left-to-right or top-to-bottom flow. Grouping related elements together, as well as maintaining consistent spacing between them, help make your diagram look easier on the eye. For better clarity, avoid lines from crossing each other, and keep your names and descriptions short.

Once you are done creating elements and connecting them with UML diagram arrows, add annotations and extra information such as links to other resources wherever appropriate. However, refrain from doing this too much as it might turn things messy. If you feel like your diagram needs a lot of extra information to convey something, it is usually a good idea to split it down into sub-diagrams.

Cross-check if your requirements are met, verify the relationships between entities, review the names and notations used in the diagram, review the behavioral accuracy of your diagram, gather feedback, and refine the diagram to ensure that it finally, accurately represents your system.

For this purpose, it’s good to use a UML diagram tool that allows you to continually work and pick up where you left off without losing progress. With it, you can quickly make adjustments and share your UML diagram to your teammates without the trouble of repeatedly publishing and sharing versions that aren’t final yet.


Get inspired with UML diagram templates

Comprehend and stay on top of your system by plotting it down in a UML diagram. Whether you’re building software or streamlining your business workflow, our UML diagram examples can be tailored to fit what you need. With your team, select a template below and get started on your design.


All you need in a UML diagram maker

Build your diagram like clockwork. Connect your classes, objects, and other elements together using our suite of easy-to-use whiteboard tools and stunning design elements. Your shareable whiteboard has infinite space, so you can account for all of the elements of your system.

  • Unlimited space for unlimited ideas

    Unlimited space for unlimited ideas

    With a free infinite canvas and unlimited number of whiteboards, fully develop your ideas and still have room.

  • Your ideas visualized

    Your ideas visualized

    Build stunning tables and graphs with automatic flowcharts, or sketch them to life with Draw.

  • All your work, in one place

    All your work, in one place

    From plan to execution, it’s all here. Take notes, brainstorm, collaborate, and more on the same whiteboard.

  • Workshop ideas to perfection

    Workshop ideas to perfection

    With your team, develop ideas through comments and stickies, and keep sync sessions on track with a timer.

  • Share your work effortlessly

    Share your work effortlessly

    Share a link to your doc and control your team's access. Present directly from the editor with Presenter view.

  • Expand your Presentation to a Whiteboard

    Expand your Presentation to a Whiteboard

    With just a single click, expand your presentation slides into infinite, collaborative whiteboards.


UML diagram best practices

Building a good UML diagram means doing practices that ensure the result is clear, understandable, and on par with standard notations and formats. With that said, it helps to consider the following when you make your UML diagram:

Less is more

Large, complex diagrams confuse more and convey less. Here are some practices you can adopt to avoid unnecessary complexity by making your diagram as simple and concise as possible.

  • Don't overload the diagram with too many elements and relationships.
  • Use clear notations and readable fonts.
  • Avoid using long names for elements.
  • Avoid too many references to external information.
  • Prevent the use of multiple colors and multiple fonts in the same diagram.

Abstract and decompose your diagram

Break down large and complex diagrams into smaller, simpler, and understandable parts. Decomposition is the process of dividing a complex system into subsystems, classes, or components with well-defined interfaces. Abstraction is the process of reducing the amount of low-level, unnecessary details and displaying only the required high-level ones. Using these techniques can help make your diagram more understandable, modular, and manageable.

Organize with layers

You can also make complex UML diagrams easier to understand by using layers or by grouping elements. With layers, you can show specific levels of detail, without compromising the bigger picture.

Organize your elements into layers, which you can lock or position according to your preference.

Organize your elements into layers, which you can lock or position according to your preference.

Insert profiles and stereotypes

Not all system domains are the same. You can use stereotypes and profiles to extend UML notation to suit your specific domain. Representing your system in your way and defining new elements can help you make your UML diagram easier to understand in your context.

Use a UML diagram maker tool

Instead of starting a diagram from scratch, use a UML diagram generator tool to ease your drawing process. A tool offers the benefits of simulation, validation, verification, and reverse engineering, all of which can help make your diagram more consistent, concise, and easy to comprehend.

A good UML diagram creator should contain the following features:

  • An easy-to-use and intuitive interface.
  • A large surface area to work on, such as a whiteboard.
  • The support of different types of UML diagrams, specifically the more popular ones (use case diagrams, activity diagrams, class diagrams, and sequence diagrams).
  • Real-time collaboration, which allows problems to be weeded out during the design process.
  • A large library of UML symbols, shapes, pictures, animations, icons, and elements to choose from.
  • Drag-and-drop tools to move components into the design.
  • Easy customization of appearance.
  • A change tracking and version control system to easily revert to previous versions.
  • Export options in different formats for easy shareability.
  • Adequate support and documentation to turn to in case of issues.
  • Affordable pricing plans and licensing options.
resource
Create UML diagrams with Canva
Canva Whiteboards has the free design elements and tools you need to create a UML diagram that’s not only fully comprehensive, but also shareable with teams.

UML diagram FAQs

To draw a UML diagram, just select a template from our library and customize it in our free online UML diagram tool. Then, use our whiteboard and AI tools to add shapes, connect lines, and drag your elements around in your canvas. You can elevate your design with color combinations, font styles, and graphics from our design library. Share it with your team for feedback and present directly from the dashboard.

The meaning of an open arrowhead depends on what kind of line it’s connected to, and what type of UML diagram you’re making.

For example, in class diagrams, when connected to a solid line, it means that there’s a “has a” relationship between the two things it connects. When connected to a dotted line, it means dependency between them. In sequence diagrams, a solid line with an open arrowhead means that the message being delivered is asynchronous.

In a class UML diagram, a public member is marked by the plus sign ‘+’.

Private members are marked with the minus sign ‘-’, while protected members are denoted by the octothorpe (or hashtag) ‘#’.

UML diagrams visually model your system. This not only makes it easier to comprehend, but also helps you assess the viability of your system, which can be helpful when you’re trying to design one.

For example, through object diagrams, you can test your system by modeling it using real-life examples. Similarly, with use case diagrams, you can identify the inside and outside factors affecting your system, as well as the behaviors between the actors within it.


Was this page helpful?

Nail down complex systems with UML diagrams

Easily comprehend systems from start to finish by mapping them in a UML diagram. With our free UML diagram tool and ready-made templates, draw clear and concise diagrams you can share with your team.
Make a UML diagram
Long Form - UML Diagrams Footer Banner (Desktop)
Long Form - UML Diagrams Footer Banner (Desktop)

More resources