I’ve drawn many flowcharts over my career. A well-drawn flowchart can explain a complicated workflow in seconds. But you need to know the right symbols.
Here’s a practical guide to flowchart symbols and how to actually use them.
Why Flowcharts Matter
Before we get into symbols, here’s why flowcharts are still relevant:
They force clarity. If you can’t draw a flowchart of your process, you don’t fully understand it.
They reveal problems. Dead ends, infinite loops, missing error handling - all obvious in a flowchart.
They communicate fast. A flowchart shows the flow in a way that paragraphs of text never will.
I’ve used flowcharts to:
- Understand operating system flows and dig deeper into how things work
- Debug production incidents
- Explain algorithms (especially recursive ones)
The Essential Symbols
1. Terminal / Terminator
Shape: Rounded rectangle (oval) Purpose: Start and end points of your flow
Use clear labels: “Start”, “Begin”, “End”, “Exit”. This tells readers where the flow begins and where it terminates.
2. Process / Rectangle
Shape: Rectangle Purpose: An action, operation, or process step
This is your workhorse symbol. Use verbs: “Calculate total”, “Send email”, “Save to database”.
3. Decision / Conditional
Shape: Diamond Purpose: A question with Yes/No or True/False outcomes
Always label the arrows coming out. “Yes/No”, “True/False”, or specific conditions like “>100” and “≤100”.
4. Data (I/O)
Shape: Parallelogram Purpose: Input or output of data
Use this for user input, file reads, API responses, or any data coming in or going out.
5. Document
Shape: Rectangle with wavy bottom Purpose: A document or report generated
In Mermaid, we approximate this with special notation:
Use this when your process creates or reads a specific document.
6. Subroutine / Predefined Process
Shape: Rectangle with double vertical lines Purpose: A process defined elsewhere (function call, subprocess)
The double brackets [[...]] in Mermaid create this style. Use it for reusable processes or functions that are detailed in separate flowcharts.
Real-World Examples
Example 1: User Login Flow
This shows a complete authentication flow with error handling and conditional 2FA.
Example 2: Deployment Process
This shows a typical CI/CD pipeline with testing gates and rollback logic.
Example 3: E-commerce Checkout
This shows decision points, error handling, and multiple end states.
Example 4: API Request Handler
This shows how to document API logic with proper HTTP status codes.
Example 5: Recursive Function
Recursion is easier to understand with a flowchart. The [[...]] notation shows the recursive call.
Tips for Drawing Better Flowcharts
1. Keep It Simple
Don’t try to fit your entire system into one flowchart. Break complex flows into multiple diagrams.
Bad: One massive flowchart with 50 boxes Good: Main flowchart with subroutines, each detailed separately
2. Use Consistent Spacing
Align your boxes. Keep arrows clean. Messy flowcharts are hard to read.
3. Label Everything
Every decision diamond needs labels on its outputs. Every process box needs a clear action.
Bad: Diamond with “Check” and arrows with no labels Good: Diamond with “User age >= 18?” and arrows labeled “Yes” and “No”
4. Show Error Paths
Don’t just show the happy path. Show what happens when things fail.
This shows retry logic and error handling - critical for production systems.
5. Avoid Spaghetti
If your flowchart has arrows going everywhere, it’s too complex. Simplify your logic or break it into sub-processes.
6. Use Color Sparingly
In Mermaid, you can add color for emphasis:
But don’t overdo it. Color should highlight important nodes, not decorate everything.
Common Flowchart Patterns
The Retry Loop
Use this pattern for network calls, database operations, or any unreliable external dependency.
The Validation Chain
Use this when you have multiple validation checks that must all pass.
The Batch Processor
Use this for processing queues, files, or any batch operation.
Creating Flowcharts with Mermaid
All the diagrams in this article are written in Mermaid syntax. Here’s a quick reference:
Syntax:
graph TD- Top to bottom flow (useLRfor left to right)([...])- Rounded rectangle (terminator)[...]- Rectangle (process){...}- Diamond (decision)[/..../]- Parallelogram (input/output)[[...]]- Subroutine (double border)-->- Arrow-->|label|- Labeled arrow
You can add these directly to markdown files and they’ll render in most modern documentation tools.
When Not to Use Flowcharts
Flowcharts aren’t always the right tool:
Use flowcharts for:
- Algorithms and logic
- Process flows with decisions
- Troubleshooting guides
- Deployment procedures
Don’t use flowcharts for:
- System architecture (use block diagrams or component diagrams)
- Data models (use ER diagrams)
- Time-based interactions (use sequence diagrams)
- Class relationships (use class diagrams)
Tools for Drawing Flowcharts
Mermaid (my preference):
- Write flowcharts in text
- Version control friendly
- Renders in markdown
- Free and open source
Lucidchart:
- Drag-and-drop interface
- Good for non-technical users
- Collaboration features
- Paid (free tier limited)
Draw.io (diagrams.net):
- Free and open source
- Desktop or web-based
- Export to many formats
- More manual than Mermaid
Graphviz:
- Text-based like Mermaid
- Very powerful for complex graphs
- Steeper learning curve
- Great for automated diagram generation
My Take
I still draw flowcharts regularly. When debugging a production issue, I’ll sketch the request flow to find where it’s breaking. When designing a new feature, I’ll flowchart the logic before writing code.
The key is keeping them simple. One decision per diamond. One action per box. Clear labels. If your flowchart is too complex to fit on a screen, break it into smaller diagrams.
And if you’re writing documentation, embed flowcharts directly in markdown using Mermaid. Your future self (and your teammates) will thank you.
Resources
Related Posts:
- Mermaid Diagram Test - Examples of different Mermaid diagram types