Data Flow Diagram (DFD) Guide: Levels 0, 1, and 2
A data flow diagram shows how information moves through a system - not the steps, but the data itself and where it goes.
A data flow diagram, or DFD, shows how data moves through a system: where it comes from, where it goes, what processes transform it, and where it gets stored. Unlike a flowchart, which shows the sequence of steps and control flow, a DFD deliberately ignores timing and order and focuses purely on the flow of information. It answers questions like "where does customer data enter this system, what happens to it, and where does it end up?" rather than "what happens first, second, and third?"
DFDs come from structured systems analysis and remain one of the clearest ways to understand what a system does with information, which is why they are still taught and used decades after their invention. Their defining feature is leveling: you start with a single high-level view and progressively decompose it into more detailed diagrams, so you can zoom from a bird's-eye overview down to fine-grained detail without losing coherence. This guide covers the four symbols, the leveling concept, and how to build each level, all of which you can draw in the editor at /diagrams.
The four DFD symbols
A DFD uses just four symbols, and that economy is part of its clarity. Learn these four and you can read any data flow diagram. Note that DFDs use a different vocabulary from flowcharts - there is no decision diamond, because a DFD does not model control logic.
- External entity (a square or rectangle): a source or destination of data outside the system - a customer, another system, a regulator. Data enters from and leaves to these.
- Process (a circle or rounded rectangle): something that transforms data, like "Validate order" or "Calculate tax". Each process takes input data and produces output data.
- Data store (an open-ended rectangle or two parallel lines): where data rests - a database, a file, a table. Data flows in to be stored and out to be used.
- Data flow (a labelled arrow): a piece of data moving from one place to another. The label names the data, like "order details" or "payment confirmation".
- Every arrow must be labelled with the data it carries - an unlabelled flow is meaningless in a DFD.
- Data cannot flow directly from one store to another, or from one entity to another, without passing through a process.
Level 0: the context diagram
The highest-level DFD is the level-0 diagram, also called the context diagram. It shows the entire system as a single process - one circle in the middle - surrounded by the external entities it exchanges data with, connected by labelled data flows. That is all. A context diagram for an online store might show a single "Order Management System" process, with external entities for Customer, Payment Gateway, and Warehouse, and flows like "order" going in and "confirmation" coming out.
The purpose of the context diagram is to define the system's boundary: what is inside (the one process) and what is outside (the entities), and every point where data crosses that boundary. It is deliberately simple - often something you could sketch on a napkin - but it is a powerful alignment tool, because getting everyone to agree on the system boundary and its external interfaces prevents enormous confusion later. If people disagree about what the context diagram should contain, they disagree about what the system even is.
Level 1 and level 2: decomposition
The level-1 DFD takes that single process from the context diagram and cracks it open into its major sub-processes. Where level 0 had one circle, level 1 might have five or six, showing the main functions the system performs - "Receive order", "Process payment", "Update inventory", "Arrange shipping" - connected by the data flows between them, and now including the data stores where information rests. The external entities from the context diagram remain around the edges.
The crucial rule is balancing: the data flows crossing the boundary in the level-1 diagram must exactly match those in the context diagram. Every flow into and out of the system at level 0 must appear at level 1; you are decomposing the process, not changing what crosses the boundary. Level 2 then takes any single process from level 1 and decomposes it further, following the same balancing rule. You keep decomposing only as far as you need - most systems are well understood at level 1 or 2, and going deeper adds detail without adding insight.
This leveled approach is what makes DFDs scale to large systems. You can present the context diagram to executives, the level-1 to managers, and level-2 diagrams to the engineers building each piece, and they are all views of the same coherent model. In Atlas Diagram Studio you can keep these linked with off-page connectors so the levels stay consistent as the design evolves.
Common DFD mistakes
The most frequent mistake is treating a DFD like a flowchart and trying to show sequence or decisions. A DFD has no time dimension and no control logic - there are no decision diamonds and the arrows do not mean "next step", they mean "data moving". If you find yourself wanting to show that something happens before something else, you are reaching for the wrong diagram type. Another common error is a process with inputs but no outputs (a "black hole" that consumes data and produces nothing) or outputs with no inputs (a "miracle" that produces data from nothing) - both signal an incomplete model.
Unlabelled data flows are the third classic mistake; every arrow must name the data it carries, or the diagram loses its meaning. And violating the balancing rule between levels - flows appearing or disappearing as you decompose - quietly corrupts the whole model. A dedicated diagram tool helps you catch these by making the structure explicit. You can build leveled DFDs with the right symbols in the editor at /diagrams, and if you already have the system described in words, the AI diagram generator at /diagram-tools/ai-diagram-generator can produce a starting context diagram to refine.