The Complete Guide to UML Diagram Types with Examples

UML stands for Unified Modeling Language which is used in object oriented software engineering. Although typically used in software engineering it is a rich language that can be used to model an application structures, behavior and even business processes. There are 14 UML diagram types to help you model these behavior.

They can be divided into two main categories structure diagrams and behavioral diagrams. All 14 UML diagram types are listed below with examples, brief introduction to them and also how they are used when modeling applications.

You can draw UML diagrams online using our software, or check out some UML diagram examples at our diagramming community.

List of UML Diagram Types

Types of UML diagrams with structure diagrams coming first and behavioral diagrams starting from position 8. Click on any diagram type to visit that specific diagram types description.

  1. Class Diagram
  2. Component Diagram
  3. Deployment Diagram
  4. Object Diagram
  5. Package Diagram
  6. Profile Diagram
  7. Composite Structure Diagram
  8. Use Case Diagram
  9. Activity Diagram
  10. State Machine Diagram
  11. Sequence Diagram
  12. Communication Diagram
  13. Interaction Overview Diagram
  14. Timing Diagram
UML Diagram Types

UML Diagram Types


Structure diagrams show the things in a system being modeled. In a more technical term they show different objects in a system. Behavioral diagrams shows what should happen in a system. They describe how the objects interact with each other to create a functioning system.

Class Diagram

Class diagrams are arguably the most used UML diagram type. It is the main building block of any object oriented solution. It shows the classes in a system, attributes and operations of each class and the relationship between each class.
In most modeling tools a class has three parts, name at the top, attributes in the middle and operations or methods at the bottom. In large systems with many related classes, classes are grouped together to create class diagrams. Different relationships between classes are shown by different types of arrows.
Below is a image of a class diagram. Follow the link for more class diagram examples or get started instantly with our class diagram templates.
UML Class Diagram Example

UML Class Diagram with Relationships

Component Diagram

A component diagram displays the structural relationship of components of a software system. These are mostly used when working with complex systems that has many components. Components communicate with each other using interfaces. The interfaces are linked using connectors. Below images shows a component diagram.

Component Diagram in UML

Simple Component Diagram with Interfaces

Deployment Diagram

A deployment diagrams shows the hardware of your system and the software in those hardware. Deployment diagrams are useful when your software solution is deployed across multiple machines with each having a unique configuration. Below is an example deployment diagram.

UML Deployment Diagram

UML Deployment Diagram ( Click on the image to use it as a template )

Object Diagram

Object Diagrams, sometimes referred as Instance diagrams are very similar to class diagrams. As class diagrams they also show the relationship between objects but they use real world examples. They are used to show how a system will look like at a given time. Because there is data available in the objects they are often used to explain complex relationships between objects.

UML Object Diagram example

UML Object Diagram Example

Package Diagram

As the name suggests a package diagrams shows the dependencies between different packages in a system. Check out this wiki article to learn more about the dependencies and elements found in package diagrams.

Package Diagram in UML

Package Diagram in UML

Profile Diagram

Profile diagram is a new diagram type introduced in UML 2. This is a diagram type that is very rarely used in any specification. For more detailed technical information about this diagram type check this link.

Profile Diagram in UML

Basic UML Profile Diagram structure

Composite Structure Diagram

Composite structure diagrams are used to show the internal structure of a class. For a detailed explanation of composite structure diagrams click here.

Composite Structure Diagram in UML

A simple Composite Structure Diagram

Use Case Diagram

Most known diagram type of the behavioral UML diagrams, Use case diagrams gives a graphic overview of the actors involved in a system, different functions needed by those actors and how these different functions are interacted.

It’s a great starting point for any project discussion because you can easily identify the main actors involved and the main processes of the system. Click through to read more about use case diagram elements and or get started instantly using our use case templates.

Use Case Diagram in UML

Use Case diagram showing Actors and main processes

Activity Diagram

Activity diagrams represent workflows in an graphical way. They can be used to describe business workflow or the operational workflow of any component in a system. Sometimes activity diagrams are used as an alternative to State machine diagrams. Check out this wiki article to learn about symbols and usage of activity diagrams.

Activity Diagrams in UML

Activity Diagrams with start, end, processes and decision points

State Machine Diagram

State machine diagrams are similar to activity diagrams although notations and usage changes a bit. They are sometime known as state diagrams or start chart diagrams as well. These are very useful to describe the behavior of objects that act different according to the state they are at the moment. Below State machine diagram show the basic states and actions.

State Machine Diagram in UML

State Machine diagram in UML, sometime referred to as State or State chart diagram

Sequence Diagram

Sequence diagrams in UML shows how object interact with each other and the order those interactions occur. It’s important to note that they show the interactions for a particular scenario. The processes are represented vertically and interactions are show as arrows. This article explains the purpose and the basics of Sequence diagrams.

You can also instantly start drawing using our sequence diagram templates.

Sequence Diagrams in UML

Sequence Diagrams in UML shows the interaction between two processes

Communication Diagram

Communication diagram was called collaboration diagram in UML 1. It is similar to sequence diagrams but the focus is on messages passed between objects. The same information can be represented using a sequence diagram and different objects. Click here to understand the differences using an example.

Communication Diagram in UML

Communication Diagram in UML

Interaction Overview Diagram

Interaction overview diagrams are very similar to activity diagrams. While activity diagrams shows a sequence of processes Interaction overview diagrams shows a sequence of interaction diagrams. In simple term they can be called a collection of interaction diagrams and the order they happen. As mentioned before there are seven types of interaction diagrams, so any one of them can be a node in an interaction overview diagram. ( img – )

Interaction Overview Diagram in UML

Interaction overview diagram in UML

Timing Diagram

Timing diagrams are very similar to sequence diagrams. They represent the behavior of objects in a given time frame. If its only one object the diagram is straight forward but if more then one objects are involved they can be used to show interactions of objects during that time frame as well. ( img – )

Timing Diagram in UML

Timing Diagram in UML

Mentioned above are all the UML diagram types. The links given in each section explains the diagrams in more detail and covers the usage, symbols etc. UML offers many diagram types and sometimes two diagram can explain the same thing using different notations.Check this blog post to learn which UML diagram best suits you.If you have any questions or suggestions feel free to leave a comment.

Tags :, , ,

About the Author

About Nishadha

Software engineer turned tech evangelist. I handle marketing stuff here at Creately including writing blog posts and handling social media accounts. In my spare time I love to read and travel. Check out my personal blog Rumbling Lankan where I write about online marketing stuff.

87 thoughts on “The Complete Guide to UML Diagram Types with Examples

  1. very helpful…………could have been better for beginners if each symbols were explained first….

  2. Good morning, Nishadha. I like the presentation of this information since it provides brief explanations and examples and links to greater detail.

    I did notice that a few of your shortcut links up top are broken. Near the very beginning of your UML diagram types page you provide a numbered list of diagram types. Each link is supposed to take me to the brief explanation and example, but numbers 7, 10, and 14 don’t work. Number 13 actually takes me to the location for number 14.

    Overall, this is a convenient presentation. Thanks.

  3. Good morning, Clark. I apologize for the mistakes. Thanks for taking the time to point them out. I have corrected them now. Enjoy the article and hope you got some value from it.

    1. By using 1 case study if you make these 14 diagrams then it will very helpful now it is although good but if you do like i say you then it much be better …! nice work

  4. Hello Nishadha,
    Thank you for the very nice article.
    I have a question, is it possible in any way that we can develop logic using UML for example we can develop a logic using MATLAB.


  5. Hi Varun,
    I haven’t used MATLAB so not sure what exactly you mean by develop logic using UML. Can you explains it a bit further ?

  6. Hi,

    what would you suggest if you want to build a diagram in which would be displyed a student grades; minimum grades to to pass a exam; final result pass or fail

  7. Hi Nishadha , I find this very helpful and easy to understand, but I have a question about the number of Diagram, I read this http:/ and I found ” ..representing the results using UML 2.0’s thirteen standard diagram types.” 13 or 14 ?

  8. Receive your great thanks.This is great work ,thank you!!!
    continue posting others articles like this.


  9. Have seen many UML diagram before, however, the way to put it all together and characterize them is very important as the author has done it here. Very nice way to represent and identify them. Enjoyed it…

  10. Hi Nishadha ,Have seen many UML diagram before, however, the way to put it all together and characterize them is very important as the author has done it here. Very nice way to represent and identify them.thanks very thanks…of iran kelardasht good time

  11. Hi Nishada,
    what a very helpful note you have given! I have a question. Pls can UML diagrams be used for the understanding of problem domain? if yes, please explain.
    Kind regards

  12. There’s an error here: “In large systems with many classes related classes are grouped together to to create class diagrams.”

    Thanks for the article.

    1. Hi Francesco, can you please explain the error there? A class diagram is a collection of classes so I feel the sentence is correct. Do think its confusing or misleading? Thanks for the feedback.

      1. Maybe it’s just confusing because you’re not using any punctuation. Please correct me if I’m wrong but I guess this is what you wanted to say: “In large systems with many classes related, (comma) classes are grouped together to (the second “to” here should be removed) create class diagrams.”

        1. Hi Francesco, agree that it is misleading and confusing. Thanks for pointing it out and I have modified the article. Hope you enjoyed the article.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This blog uses premium CommentLuv which allows you to put your keywords with your name if you have had 9 approved comments. Use your real name and then @ your keywords (maximum of 3)