Prisma Schema Visualizer
A tool that takes schema.prisma code and displays each model as a card, letting you visually check field names, types, constraints (@id, @unique, optional), and @relation references between models. It also supports filtering by model name.
How to use
- Paste your schema.prisma code into the input field. You can also try it out with "Load sample schema".
- Each model is displayed as a card, showing field names, types, the "?" optional marker, unique constraints, and relation targets.
- If you have many models, narrow them down with the "Filter by model name" search field.
- The "Relations" list at the bottom shows which field of which model references which other model, along with its cardinality (one-to-one / many-to-one / one-to-many).
About this tool
The Prisma Schema Visualizer converts text-based schema.prisma code into a readable card-based UI, making it easy to quickly grasp the relationships between models. It's useful for understanding the overall shape of a large schema, or for explaining model structure during a review.
Each field shows a key icon for the primary key, a badge for unique constraints, and a "?" badge for optional fields. Fields marked with `@relation`, or inferred to reference another model, show an arrow followed by the target model's name.
The "Relations" list at the bottom collects every relation detected across the whole schema in the form `Model.field → target model`, and shows an approximate cardinality — "one-to-many" or "one-to-one / many-to-one" — based on whether the field is a list type.
Frequently asked questions
How is the relation cardinality (one-to-one, one-to-many, etc.) determined?
If a field is an array type (has "[]", like `Post[]`), it's shown as "one-to-many"; otherwise it's shown as "one-to-one / many-to-one". Accurately detecting many-to-many relations requires analyzing both sides of the relation definition, so treat this as an approximation.
Are enums displayed?
Yes. If the schema contains `enum` definitions, they're shown below the model list under "Enums", as cards listing each defined value.
Does it support a schema.prisma split across multiple files?
Only the text pasted into the input field is analyzed. If your schema is split across multiple files, combine their contents into a single block of text before pasting it in.
Is my input schema sent to a server?
No. Parsing the schema and rendering the cards both happen entirely with JavaScript in your browser.