Mermaid Diagram Editor

Create flowcharts, sequence diagrams, class diagrams, and more with our free online Mermaid diagram editor. Features live preview, multiple diagram types, and easy export options.

Loading editor...
Preview
100%

Create professional diagrams using Mermaid syntax with real-time preview. Perfect for software documentation, system design, and process visualization.

Features

Real-time Diagram Preview

Instantly visualize your Mermaid diagrams as you type with live preview

Multiple Diagram Types

Support for flowcharts, sequence diagrams, class diagrams, and more

Export & Share

Export diagrams as SVG or PNG, and share your work with others

Frequently Asked Questions

What is Mermaid diagram syntax?

Mermaid is a simple markdown-like syntax for creating diagrams. It allows you to create various types of diagrams including flowcharts, sequence diagrams, class diagrams, and more using text-based descriptions.

What types of diagrams can I create with Mermaid?

You can create flowcharts, sequence diagrams, class diagrams, entity relationship diagrams (ERD), state diagrams, Gantt charts, pie charts, and user journey diagrams using Mermaid syntax.

How do I export my Mermaid diagrams?

You can export your diagrams as SVG or PNG files using the export button in the toolbar. You can also share your diagrams with others using the share button, which generates a unique URL containing your diagram code.

Can I use Mermaid diagrams in my documentation?

Yes! Mermaid diagrams are widely supported in documentation tools like GitHub, GitLab, and various Markdown processors. You can copy the diagram code and use it directly in your documentation.

Where can I learn more about Mermaid?

Explore these official resources and learning materials:

Official Documentation:

Diagram Types:

Integration & Tools:

These resources cover everything from basic diagrams to advanced integrations!

Mermaid Syntax Guide

Quick reference for creating flowcharts, sequence diagrams, class diagrams, and more with Mermaid syntax.

Flowcharts
graph TD\n    A[Start] --> B{Decision?}\n    B -->|Yes| C[Process]\n    B -->|No| D[End]\n    C --> D

Basic flowchart with decision node and conditional paths

Example: graph LR\n A --> B
A[Rectangle]\nB(Rounded)\nC{Diamond}\nD((Circle))\nE>Flag]\nF[/Parallelogram/]\nG[\\Database/]\nH((fa:fa-user User))

Node shapes: rectangle, rounded, diamond, circle, flag, parallelogram, database, with icons

A --> B\nA -.-> C\nA ==> D\nA -- text --> E\nF -.text.-> G\nH ==text==> I

Arrow types: solid, dotted, thick, with text labels on different arrow styles

subgraph "User Interface"\n    A[Login] --> B[Dashboard]\nend\nsubgraph "Backend"\n    C[API] --> D[Database]\nend\nB --> C

Group related nodes in subgraphs with cross-group connections

A --> B\nB --> C\nC --> D\nD --> A\nstyle A fill:#f9f,stroke:#333,stroke-width:4px\nstyle B fill:#bbf,stroke:#333,stroke-width:2px

Custom styling for nodes with colors and stroke widths

Sequence Diagrams
sequenceDiagram\n    participant U as User\n    participant F as Frontend\n    participant B as Backend\n    U->>F: Login Request\n    F->>B: Validate Credentials\n    B-->>F: Auth Token\n    F-->>U: Success

Basic sequence with participant aliases and message flow

A->>+B: Request\nB->>+C: Forward\nC-->>-B: Reply\nB-->>-A: Response\nNote right of A: User waits\nNote over B,C: Processing

Activation boxes with +/- for lifeline control and notes

loop Every minute\n    A->>B: Heartbeat\nend\nalt Success\n    B->>A: OK\nelse Failure\n    B->>A: Error\nend\nopt Cache Available\n    A->>A: Use Cache\nend

Control structures: loop, alt/else, opt for conditional flows

par Parallel Task 1\n    A->>B: Process 1\nand Parallel Task 2\n    A->>C: Process 2\nend\nB->>A: Result 1\nC->>A: Result 2

Parallel processing with par/and blocks

Class Diagrams
classDiagram\n    class Animal {\n        +String name\n        +int age\n        +makeSound() void\n        -String species\n    }\n    class Dog {\n        +bark() void\n    }\n    Animal <|-- Dog

Class definition with visibility modifiers (+public, -private, #protected)

class BankAccount\n    BankAccount : +String owner\n    BankAccount : +BigDecimal balance\n    BankAccount : +deposit(amount)\n    BankAccount : +withdrawal(amount)

Alternative class syntax with colon notation

Customer ||--o{ Order : places\nOrder ||--|{ LineItem : contains\nProduct ||--o{ LineItem : ordered

Relationships: inheritance (|--), composition (--*), aggregation (--o), association (--)

State Diagrams
stateDiagram-v2\n    [*] --> Idle\n    Idle --> Active : start\n    Active --> Processing : process\n    Processing --> Idle : complete\n    Processing --> Error : fail\n    Error --> Idle : reset\n    Active --> [*] : terminate

State transitions with labeled triggers and final states

state Processing {\n    [*] --> Validating\n    Validating --> Saving\n    Saving --> [*]\n}

Composite states with internal state machines

Entity Relationship Diagrams
erDiagram\n    CUSTOMER {\n        string name\n        string email\n        int customer_id PK\n    }\n    ORDER {\n        int order_id PK\n        int customer_id FK\n        date order_date\n    }\n    CUSTOMER ||--o{ ORDER : places

ER diagram with entities, attributes, primary keys (PK), and foreign keys (FK)

CUSTOMER ||--o{ ORDER : "1 to many"\nORDER }|--|| PRODUCT : "many to 1"\nCUSTOMER }o--o{ PRODUCT : "many to many"

Different relationship cardinalities with labels

Gantt Charts
gantt\n    title Project Timeline\n    dateFormat YYYY-MM-DD\n    section Planning\n    Requirements    :done, req, 2024-01-01, 2024-01-15\n    Design         :active, design, 2024-01-10, 2024-01-25\n    section Development\n    Frontend       :dev1, after design, 30d\n    Backend        :dev2, after design, 25d

Project timeline with sections, tasks, dependencies, and status

User Journey
journey\n    title User Shopping Experience\n    section Discovery\n      Visit Homepage: 5: User\n      Browse Products: 3: User\n      View Details: 4: User\n    section Purchase\n      Add to Cart: 5: User\n      Checkout: 2: User\n      Payment: 3: User, System\n      Confirmation: 5: User, System

User journey mapping with satisfaction scores (1-5) and actors

Git Diagrams
gitgraph\n    commit\n    commit\n    branch develop\n    checkout develop\n    commit\n    commit\n    checkout main\n    merge develop\n    commit

Git branching and merging visualization

Resources

Mermaid Documentation

Complete Mermaid guide and tutorials

Mermaid Live Editor

Official online editor

Mermaid GitHub

Source code and examples

Flowchart Syntax

Detailed flowchart documentation

Related Mermaid Diagram Editor Articles

6 articles

Discover more insights about mermaid diagram editor and related development topics

AI Diagram Generator - Create Diagrams from Text Prompts 2025

Generate professional diagrams using AI and natural language prompts. Create flowcharts, architecture diagrams, network maps, and data visualizations in seconds. Complete guide with 50+ tested prompts and examples.

Oct 16, 2025
Featured

Free Diagram Tools Comparison - Mermaid vs Lucidchart vs Draw.io vs Visio 2025

Honest comparison of top diagram tools: Mermaid, Lucidchart, Draw.io, and Visio. Feature breakdown, pricing analysis, and recommendations for developers, business teams, and everyone in between. Find the right tool for your needs.

Oct 15, 2025
Featured

How to Create Diagrams Online: Complete Beginner's Guide

Learn how to create professional diagrams online for free. Step-by-step guide covering flowcharts, architecture diagrams, network maps, and data visualizations. No installation or design skills required.

Oct 14, 2025
Featured

Mermaid Diagram Tool Online - Free Flowchart & UML Editor

Create flowcharts, sequence diagrams, and UML visualizations with Mermaid online. Free browser-based editor with GitHub integration, live preview, and AI generation. No installation required.

Oct 13, 2025
Featured

Gnuplot Online - Free Scientific Data Visualization & Plotting Tool

Create scientific plots, mathematical visualizations, and data charts with Gnuplot online. Free browser-based editor with 2D/3D plotting, live preview, and instant export. No installation required.

Oct 12, 2025
Featured

GraphViz Online - Free DOT Editor for Network Diagrams & Graphs

Create network diagrams, dependency graphs, and organizational charts with GraphViz DOT language online. Free browser-based editor with live preview, multiple layout engines, and instant export. No installation required.

Oct 11, 2025
Featured