DBML to ERD — From Code to Canvas

Paste your DBML and get a shared visual canvas of your database schema. It opens ready to edit, no syntax required.

No signup required.

Your DBML
Table customers {
  id         integer [pk]
  name       varchar
  email      varchar [unique]
  created_at timestamp
}

Table orders {
  id          integer [pk]
  customer_id integer [ref: > customers.id]
  status      varchar
  total       decimal
}

Table order_items {
  id         integer [pk]
  order_id   integer [ref: > orders.id]
  product_id integer
  quantity   integer
}

TableGroup Orders {
  orders
  order_items
}
Your diagram
Orders
customers
id integer
namevarchar
emailvarchar
created_atts
order_items
id integer
order_idinteger
product_idinteger
quantityinteger
orders
id integer
customer_idinteger
statusvarchar
totaldecimal

Used by 600,000+ developers — including teams at

Storytel
Instacart
Cisco
Accenture
Fujitsu
Lush

Try it now

Paste DBML, get a diagram

Bring it with you

Keep the structure you already wrote.

Paste DBML from dbdiagram or your repo, and DrawSQL maps your tables, columns, and foreign keys into an editable ERD. It keeps the parts other tools drop, too: groups, notes, and enums.

Table groups

TableGroup blocks become real canvas groups, not flattened into the layout.

Sticky notes

Standalone Note blocks land on the canvas as sticky notes.

Enums

Enum types map onto every column that uses them, values and all.

drawsql.app/draw

This is what opens

DrawSQL database schema diagram editor showing tables, columns, and foreign key relationships

Now do what text-only can’t

Edit on the canvas

Drag tables, rename fields, add columns. No DBML to hand-edit.

Collaborate on the canvas

Invite the team and shape the same diagram together.

AI on the canvas

Describe a change in plain English. It appears on the diagram.

FAQ

Frequently asked questions

DBML is the text format dbdiagram uses to define a schema. You don’t need to know it to use this page. Paste it, and DrawSQL renders it as a diagram you edit by clicking and dragging, no syntax required.
Tables, columns, types, and foreign keys (Ref:), plus table groups and Note blocks as sticky notes.
Yes. Copy your schema out of dbdiagram and paste it here. It’s the same DBML, so tables, groups, and sticky notes carry over. For a fuller side-by-side, see DrawSQL vs dbdiagram.

Next step

Visualize your DBML now. Save it if it sticks.

No account needed to start. If the diagram becomes useful, save it and bring the team in.

Have raw SQL instead? Paste it directly.