SQL to ER Diagram
Home › Prisma to DBML

Prisma to DBML

Paste your schema.prisma and export it as DBML — ready for dbdiagram.io and other DBML tools — while you preview the live ER diagram.

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

How it works

  1. Paste the contents of your schema.prisma — Prisma is auto-detected.
  2. The diagram renders so you can confirm models and relations.
  3. Click Export → DBML and copy the result.
  4. Paste it into dbdiagram.io or any DBML-based workflow.

Example

This Prisma schema:

model User {
  id    Int    @id @default(autoincrement())
  email String @unique
  posts Post[]
}
model Post {
  id       Int  @id @default(autoincrement())
  author   User @relation(fields: [authorId], references: [id])
  authorId Int
}

…exports as this DBML:

Table "User" {
  "id" Int [pk]
  "email" String [unique]
}
Table "Post" {
  "id" Int [pk]
  "authorId" Int
}
Ref: "Post"."authorId" > "User"."id"

Copy it from Export → DBML. Try it with your own →

Why use it

Prisma → DBMLPrisma → MermaidPrisma → SVG

FAQ

How do I convert a Prisma schema to DBML?

Paste your schema.prisma, then click Export → DBML and copy the output. Models become Tables and @relation fields become Refs.

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