What Is a Mermaid Diagram? (And Why BAs Should Care)
A Mermaid diagram is a picture made from plain text. See it work on a refund process in the free Mermaid live editor, and learn why business analysts use it: quick to change, easy to version and easy to review.
Step by step
Text in, diagram out
- What is Mermaid?. A Mermaid diagram is a picture made from text. You write lines like A, arrow, B, and Mermaid draws the boxes and arrows for you. Here's a refund process for our online shop, made from seven short lines.
See it work
- Diagram type. Let's write it. Clear the editor and type flowchart TD, for top down. Every Mermaid diagram starts with its type.
flowchart TD - One line, one link. Each line says one thing. Refund asked, arrow, check receipt. The brackets pick the shape. Round ones make the start, square ones make a task. Text in, diagram out. You never place a box by hand.
A([Refund asked]) --> B[Check receipt] - Decisions. Curly brackets make a decision. Within thirty days? Yes pays the refund. No offers store credit. Each label sits between two pipe characters. Both paths end at the same shape. Write its ID once, then point the second path at the same ID. And there's the whole refund process, laid out for you.
B --> C{Within 30 days?} C -->|Yes| D[Pay refund] C -->|No| E[Offer store credit]D --> F([Case closed]) E --> F
Why B As care
- Quick to change. Why should a business analyst care? First, it's quick to change. When the policy moves to sixty days, you edit this one line, and the drawing updates in a second.
- Easy to version. Second, it's easy to version. It's plain text, so it can live next to your requirements in a wiki or in version control. A reviewer sees exactly which line changed.
- Easy to review. Third, it's easy to review. Anyone with a browser can open it, read it out loud, and suggest a fix. No special software, no licence.
Recap
- The rules. So, Mermaid turns text into diagrams. Start with the type, write one link per line, and let it draw. It's quick to change, easy to version and easy to review.