SQL to ER Diagram
Home › Mermaid

Mermaid to ER Diagram

Paste a Mermaid erDiagram and turn it into a fully interactive ER diagram you can drag, auto-arrange, and export — no Markdown renderer required.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link
ER diagram of the Mermaid example schema: USERS and POSTS (2 tables, 2 relationships)
The Mermaid example below, drawn by the tool: USERS and POSTS (2 tables, 2 relationships).

At a glance

What it is
SQL to ER Diagram is a free, open-source browser tool that turns a Mermaid erDiagram into an interactive entity-relationship (ER) diagram.
Input
A Mermaid erDiagram block.
Output
An interactive ER diagram you can rearrange, then export as PNG, SVG, Mermaid, DBML or PlantUML, or share as a link.
Cost
Free. MIT-licensed open source. No account or signup.
Privacy
Runs entirely in your browser. The schema is never uploaded, and share links carry the diagram in the URL fragment, which is not sent to a server.
Limits
It never connects to your database itself: you paste schema text, or run one read-only catalog query in your own client and paste the result. There are no accounts, so there is no real-time multi-user editing; diagrams are kept in your browser, as a saved file, or as a share link. Layout stays smooth at around 300 tables.

How it works

  1. Copy your Mermaid erDiagram block.
  2. Paste it into the editor — Mermaid is auto-detected.
  3. Each entity becomes a table; relationships are drawn with the right cardinality.
  4. Arrange, hide tables, then export PNG/SVG or convert to DBML/PlantUML.

Example

A Mermaid erDiagram like this:

erDiagram
  USERS ||--o{ POSTS : writes
  USERS {
    int id PK
    string email
  }
  POSTS {
    int id PK
    int user_id FK
  }

…renders two tables with a relation between USERS and POSTS. Try it with your own →

Guide

Mermaid erDiagram blocks are everywhere — GitHub READMEs, GitLab wikis, Notion pages, Obsidian notes — but the default renderer gives you a static picture you can't touch. Paste the same block here and you get a live canvas: every entity becomes a draggable table, every relationship keeps its crow's-foot cardinality, and you can export the result as an image or convert it to DBML or PlantUML.

Cardinality notation reference

Entities defined only by relationship lines (no attribute block) render as compact nodes — useful when your diagram is at the "sketch" stage. Comments in double quotes after the relationship (: "places") are kept as edge labels.

Why use it

MermaidDBMLPlantUMLSQLPrisma

FAQ

Can I edit a Mermaid ER diagram visually?

Paste the Mermaid erDiagram to render it, then drag and arrange tables on the canvas. You can also convert it to SQL-style images or DBML via Export.

Does it support Mermaid cardinality?

Yes — one-to-one, one-to-many and many-to-many crow’s-foot notations are recognised and drawn.

Is my schema uploaded anywhere?

No. Everything runs locally in your browser — your schema is never uploaded to or stored on any server.

Is it free?

Yes. It is completely free and open source, with no account or sign-up required.

Related