# C4 Model

> Four zoom levels for drawing software. Start with the big map and end at the code.

**Field:** Software Development  
**Category:** Architecture  
**Also known as:** C4 Diagrams, C4 Architecture Model, C4 Model Diagram

## Think of it like

It is like a map app. You zoom from the country to the city, then to one street.

## Definition

The C4 model is a way to draw software at four levels of zoom. The first level, system context, shows your system, the people who use it and the other systems it talks to. The second, containers, shows the apps and data stores inside it. The third, components, opens one container to show its main parts. The fourth, code, shows classes and is rarely drawn. Simon Brown made it, and it works with any drawing tool.

## Example

Emma joins a team that runs an online shop. Its context diagram shows shoppers, the shop and the payment service. The container diagram then shows the web app, the API and the database.

## Why it matters

Each reader gets the level they need. A manager reads the first map, and a new developer zooms in to the third.

## Common mistake

Reading container as a Docker container. In C4 it means any app or data store that runs, like a web app, a phone app or a database.

## Three principles

- **Four zoom levels.** Context, containers, components, then code.
- **Any tool.** No special symbols or tool needed.
- **Draw the top.** Most teams stop at containers or components.

## Related terms

- [Unified Modeling Language (UML)](https://learn.benibix.com/term/development/uml)
- [Software Architecture](https://learn.benibix.com/term/development/software-architecture)
- [Architecture Decision Record (ADR)](https://learn.benibix.com/term/development/architecture-decision-record)
- [Technical Design Document](https://learn.benibix.com/term/development/technical-design-document)
- [Diagramming Software](https://learn.benibix.com/term/design/diagramming-software)

## Told apart from

- [C4 Model vs UML](https://learn.benibix.com/compare/c4-model-vs-uml): People think the C4 model is a kind of UML, and it is not. UML is a set of symbols with strict rules, and it has many kinds of diagram. C4 is a set of four zoom levels, from the whole system down to the code. It asks for no special symbols. Many teams draw C4 maps with plain boxes and arrows, and use UML only for the code level.

![Four panels in a row, joined by arrows. System context: a shopper uses the online shop, which calls a payment service. Containers: inside the online shop sit a web app, an API and a database. Components: inside the API sit orders, payments and stock. Code: two class boxes, Order with id, total and addItem, and OrderItem with qty and price.](https://learn.benibix.com/diagrams/dev-c4-model.svg)

---

Source: https://learn.benibix.com/term/development/c4-model
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
