Control flow graph examples.
Same tool, four requests. Every drawing below is a real render.
Rather start from a finished drawing? Browse 1188 flowchart templates →
What a control flow graph is.
A control flow graph, or CFG, represents the paths a program can take. Its nodes are blocks of work and its directed edges show transfers of control, including true and false branches and loop backs.
Unlike a general process flowchart, a CFG focuses on execution paths. It helps readers identify reachable blocks, cycles and alternate paths for testing or program analysis.
- Standard
- Sugiyama layered DAG + orthogonal routing
- Engine
- schematex-flowchart
- Editable
- Double-click text, drag nodes
- Export
- SVG · PNG · PDF
Who uses control flow graphs.
Payment, stock and delivery branches reviewed as a complete set of outcomes.
Small looping controllers used to identify nodes, edges and cycles in a program path.
Safety checks, reject paths and repeat cycles exposed when planning branch coverage.
How to make a control flow graph in three steps.
Describe it
One paragraph is enough to start.
See the drawing
Drawn by the right engine.
Say what changes
Every edit keeps a version.
Common questions
What is a control flow graph?
A CFG represents the paths of execution through a program. Nodes are basic blocks or operations, and edges are transfers such as conditional branches, jumps and loop backs.
How is a control flow graph different from a flowchart?
A flowchart can describe any process. A control flow graph specifically models paths through program logic, so it is useful for testing, compiler work and code analysis.
Can I make a CFG from pseudocode?
Yes. Describe each block, decision, loop and exit path. Numbered basic blocks can be added when that helps the analysis.
Who uses control flow graphs?
Compiler students, software engineers, test engineers and security researchers use them to study branches, loops, coverage and program structure.
Other drawings for the same work.
Map the paths through your program.
Free account, no card. Describe the blocks and branches to draw a control flow graph.
Open the editor