SQL to ER Diagram
Home › DBML

DBML to ER Diagram

Paste DBML (Database Markup Language) and get an interactive ER diagram instantly. A free, in-browser DBML visualizer — import DBML, export PNG, SVG, Mermaid or PlantUML.

Open the diagram tool →
No signup · nothing uploaded · export PNG / SVG / Mermaid / DBML · shareable link

How it works

  1. Copy your .dbml file or DBML snippet.
  2. Paste it into the editor — DBML is auto-detected.
  3. Each Table renders with its columns; Ref: and inline [ref: > …] become relations.
  4. Arrange, hide tables, then export PNG/SVG or convert to Mermaid/PlantUML.

Example

DBML like this:

Table users {
  id integer [pk]
  email varchar [unique]
}

Table posts {
  id integer [pk]
  user_id integer [ref: > users.id]
}

…renders two tables with a relation from posts.user_idusers.id. Try it with your own →

Why use it

DBMLMermaidPlantUMLSQLPrisma

FAQ

What is DBML?

DBML (Database Markup Language) is a simple, readable DSL for defining database schemas, popularized by dbdiagram.io. Paste it here to visualize it instantly.

Can I convert DBML to SQL or Mermaid?

Paste your DBML, then use Export to get Mermaid or PlantUML, or a PNG/SVG image of the diagram.

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