Skip to main content

Mermaid Diagram Generator

Write Mermaid syntax and see your diagram live. Supports flowcharts, sequence diagrams, class diagrams, ER diagrams, and Gantt charts — compatible with GitHub, Notion, Obsidian, and more.

✓ 5 diagram types ✓ Live preview ✓ GitHub compatible ✓ Copy code instantly

Frequently Asked Questions

What is Mermaid and where can I use it?▼

Mermaid is a JavaScript-based diagramming language that turns text into diagrams. It's supported natively in GitHub Markdown, GitLab, Notion, Obsidian, and VS Code (with extensions). You can also embed it in any webpage using the mermaid.js library. Great for documentation-as-code.

What diagram types does this tool support?▼

Flowchart (processes, decisions, branching), Sequence diagram (actor/system interactions over time), Class diagram (OOP relationships and methods), ER diagram (database entity-relationship), and Gantt chart (project timelines with task dependencies). The editor includes a working example for each type.

How do I add a Mermaid diagram to GitHub?▼

In any GitHub Markdown file (.md), wrap the Mermaid code in triple backtick blocks with 'mermaid' as the language: ```mermaid (newline) your diagram code (newline) ```. GitHub renders these automatically in .md files, issues, and pull request descriptions.

What's the syntax for flowchart arrows?▼

In Mermaid flowcharts: --> is a normal arrow, --- is a line without arrow, -- text --> adds a label, ==> is a thick arrow, and -.-> is a dotted arrow. Node shapes: [Rectangle], (Rounded), {Diamond for decisions}, ((Circle)), >Asymmetric]. Flowchart direction: TD (top-down), LR (left-right), RL (right-left), BT (bottom-top).

How do I export the diagram as an image?▼

Right-click the rendered SVG and choose 'Save image as' to download as SVG. For PNG export, you can use the mermaid CLI (npm install -g @mermaid-js/mermaid-cli then mmdc -i diagram.md -o diagram.png) or paste your code into Mermaid Live Editor at mermaid.live for more export options.

Why isn't my diagram rendering?▼

Common errors: incorrect indentation (use spaces, not tabs), missing diagram type keyword on the first line (e.g. flowchart TD), unmatched brackets or quotes, or invalid keywords. Check the error message in the preview panel — it usually points to the problematic line.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →