SQL to ER Diagram
Home › Prisma

Prisma to ER Diagram

Paste your schema.prisma and instantly get a clean, interactive entity-relationship diagram — models, fields and relations, drawn automatically. Free, open source, and 100% in your browser.

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

How it works

  1. Copy the contents of your schema.prisma file.
  2. Paste it into the editor — the format is auto-detected as Prisma.
  3. Every model becomes a table; relations are drawn from your @relation fields.
  4. Drag tables to arrange, hide noise, then export as PNG/SVG or share a link.

Example

A Prisma schema like this:

model User {
  id     Int     @id @default(autoincrement())
  email  String  @unique
  posts  Post[]
}

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

…renders as two tables (User, Post) with a relation from Post.authorIdUser.id. Try it with your own →

Guide

Prisma schemas describe your database twice over: once in the model blocks and once in the @relation attributes that wire them together. This tool reads both. A model becomes a table node with all of its scalar fields; a field annotated with @relation(fields: [authorId], references: [id]) becomes a drawn edge from the current model to the target model, with the correct one-to-many or one-to-one crow's-foot.

A few things worth knowing before you paste:

A common use case: you inherit a codebase, paste schema.prisma, and within seconds you can see whether the User ↔ Profile relation is one-to-one, which models are orphans with no relations at all, and where a join table was hand-rolled instead of using an implicit relation. Export the PNG and drop it into your team's onboarding doc.

Why use it

PrismaSQLSQLAlchemySequelize

FAQ

How do I turn a Prisma schema into an ER diagram?

Paste your schema.prisma into the editor. It auto-detects Prisma, renders every model as a table, and draws relations from your @relation fields — instantly, in the browser.

What else is supported besides Prisma?

Raw SQL (CREATE TABLE for PostgreSQL, MySQL, SQLite, SQL Server, Oracle, Snowflake), plus DBML, Mermaid, SQLAlchemy and Sequelize models.

Is my schema uploaded anywhere?

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

Can I export the diagram?

Yes — export a high-resolution PNG or vector SVG, copy the schema as Mermaid, DBML or PlantUML, or share a link that encodes the whole diagram in the URL.

Is it free?

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

Related