Skip to content
MermaidViewer

AI Entity Relationship Diagram generator

Describe your entity relationship diagram in plain English and get editable Mermaid code instantly. Design database schemas with entities, keys and crow's-foot relationships.

Free · no sign-up for your first few diagrams each day

Example prompts for a entity relationship diagram

  • “SaaS multi-tenant schema with organizations, users and roles”
  • “Hotel booking database”
  • “Inventory and warehouse management”

What a Mermaid entity relationship diagram looks like

Example entity relationship diagram

Example entity relationship diagram diagram
mermaid
erDiagram
    CUSTOMER ||--o{ ORDER : places
    ORDER ||--|{ ORDER_ITEM : contains
    PRODUCT ||--o{ ORDER_ITEM : "ordered in"
    CUSTOMER {
      uuid id PK
      string email UK
      string name
      datetime created_at
    }
    ORDER {
      uuid id PK
      uuid customer_id FK
      string status
      decimal total
    }
    ORDER_ITEM {
      uuid order_id FK
      uuid product_id FK
      int quantity
    }
    PRODUCT {
      uuid id PK
      string sku UK
      decimal price
    }
Open in the live editor

Want to write it by hand? See the full Mermaid entity relationship diagram syntax and examples, or browse templates.

Frequently asked questions

How do I generate a entity relationship diagram with AI?

Describe the entity relationship diagram you need in the box above and click Generate. The AI writes valid Mermaid entity relationship diagram code that renders instantly, and you can open it in the editor to refine it.

Is the AI entity relationship diagram generator free?

You can try it free — 5 AI generations in total, no sign-up needed. Starter includes 500 AI conversations a month and Pro is unlimited. Manual editing and export stay free after that.

Can I edit the generated entity relationship diagram?

Absolutely. The output is plain Mermaid code — edit it by hand in the live editor, or ask the AI for changes in natural language.

Other AI generators