SQL to ER Diagram
Home › Mermaid to ERD

Mermaid to ERD

Paste a Mermaid erDiagram and turn the text into a fully interactive ERD — drag tables, auto-arrange, and export to image, DBML or PlantUML.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link
ER diagram of the Mermaid to ERD example schema: CUSTOMER and ORDER (2 tables, 2 relationships)
The Mermaid to ERD example below, drawn by the tool: CUSTOMER and ORDER (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.
  2. Paste it into the editor — Mermaid is auto-detected.
  3. Entities become draggable tables; relationships are drawn with cardinality.
  4. Arrange, then export PNG/SVG or convert to DBML/PlantUML.

Example

A Mermaid erDiagram like this:

erDiagram
  CUSTOMER ||--o{ ORDER : places
  CUSTOMER {
    int id PK
    string name
  }
  ORDER {
    int id PK
    int customer_id FK
  }

…becomes an interactive ERD with CUSTOMER linked to ORDER. Try it with your own →

Guide

Mermaid renders your erDiagram as a fixed SVG — you take what the layout engine gives you. Paste the same block here and it becomes a real ERD canvas: entities are tables you can drag into place, relationships re-route as you move things, and the whole picture stays consistent when you edit it.

The typical flow: copy the erDiagram out of your README or design doc, paste, untangle the layout (auto-arrange first, then drag the exceptions), and export an SVG that actually fits the slide. Along the way you can convert the Mermaid into DBML — handy when the sketch graduated into a real schema that lives in a DBML-based tool.

Supported syntax: all nine cardinality combinations (||, o|, }o, ||… on both ends), attribute blocks with PK/FK/UK key markers, quoted relationship labels, and entities referenced before they're defined. If your block renders in GitHub, it will parse here — the grammar is the same, the output is just editable.

Why use it

MermaidDBMLPlantUMLPNG / SVG

FAQ

How do I turn Mermaid text into a diagram I can edit?

Paste the Mermaid erDiagram here — it renders as draggable tables you can arrange, then export as an image or convert to DBML/PlantUML.

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