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.
How it works
- Copy the contents of your
schema.prismafile. - Paste it into the editor — the format is auto-detected as Prisma.
- Every
modelbecomes a table; relations are drawn from your@relationfields. - 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.authorId → User.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:
- Implicit many-to-many — when you write
posts Post[]on one side andauthor User[]on the other without an explicit relation, Prisma creates a hidden_PostToUserjoin table. The diagram draws a many-to-many edge directly between the two models, which is usually what you want to see. - Enums and types —
enumblocks are attached to the fields that use them, so you can read them straight off the table node. - Multi-file schemas — if you split your schema across files (Prisma's
schema/folder withprismaSchemaFolder), concatenate the files in any order and paste the result; models are matched by name.
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
- Relations drawn automatically from
@relation— no manual wiring. - Private: everything runs in your browser — nothing is uploaded or stored on a server.
- Interactive: drag tables, auto-arrange, hide noise, add notes, and manually link columns.
- Export a high-res PNG, vector SVG, or the schema as Mermaid / DBML / PlantUML code.
- Free & open source — no account, no sign-up.
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.