JSON Input
Paste a sample object or an array of objects.
Convert Tools
Turn sample JSON into ready-to-edit Prisma model drafts —
with scalar types, Int/Float/DateTime detection, and relations for nested objects and arrays. Perfect for prototyping a database schema.
Paste a sample object or an array of objects.
Copy into your schema.prisma file.
// Your generated Prisma schema will appear heremodel blocks for objectsEverything runs locally in your browser. Your JSON is never uploaded to a server, so it is safe to use with internal data.
A JSON to Prisma schema generator automatically converts a sample JSON payload into Prisma schema model definitions — the data model language used by the Prisma ORM for Node.js and TypeScript. Instead of hand-writing model blocks, scalar field types, and relation fields, you paste real JSON
and the tool infers a complete draft schema in milliseconds.
The generator inspects each value to pick a Prisma scalar type — Int or Float for numbers, Boolean, String, and DateTime for ISO
date strings. Nested objects become separate related models with one-to-one relations, and arrays of objects become one-to-many
relations complete with the relation scalar foreign keys Prisma requires.
The output is a starting point for prototyping — review optional fields, indexes, and relation directions before running prisma migrate. Everything is computed locally in your browser, so no JSON
ever leaves your machine.
User or Order. This becomes the top-level Prisma model; nested objects and arrays are named automatically from their keys.schema.prisma file, then run npx prisma format and npx prisma migrate dev.Paste a real REST or GraphQL response and instantly get a relational draft. It is the fastest way to turn an external payload into a database model you can iterate on.
When sketching a side project, mock up the JSON shape of your entities and generate the Prisma models in one step instead of typing every field by hand.
Have seed data or fixtures stored as JSON? Generate models that match their structure so you can load the data into PostgreSQL, MySQL, or SQLite with Prisma.
See how nested objects map to relations, how arrays become one-to-many links, and how foreign keys are wired — a quick, hands-on way to understand the Prisma schema language.
Produce a readable schema draft from a sample payload to share in a design discussion before anyone commits to migrations or relation directions.
Generate clean Prisma snippets from example JSON for tutorials, blog posts, or internal docs without crafting the syntax manually.
A nested object becomes its own model linked by a one-to-one relation, and an array of objects becomes a separate model joined by a one-to-many relation. The tool adds the relation field, the relation scalar foreign key, and the back-relation field that Prisma requires on both sides.
Whole numbers map to Int and numbers with a decimal point map to Float. If a field is sometimes whole and sometimes fractional in your real data, change it to Float (or Decimal) after generating.
Yes. When "Detect DateTime from ISO strings" is enabled, strings that match an ISO 8601 date or date-time pattern (for example 2024-01-15T10:30:00Z) are typed as DateTime. Turn the option off to keep them as plain String fields.
A null value cannot be typed, so the field is marked optional and defaults to String? — adjust the type to match your real data. When you paste an array of objects, any key missing from some items is also marked optional.
Prisma supports scalar list fields like String[] only on PostgreSQL and MongoDB. If you select MySQL, SQLite, or SQL Server, the tool adds a note suggesting you model those values as a related table instead.
Treat it as a draft. JSON is a single snapshot, so review optional fields, add indexes and unique constraints, confirm relation directions, and run npx prisma format before generating migrations.
No. All parsing and schema generation runs locally in your browser with JavaScript. Nothing is uploaded, so you can safely use confidential or proprietary payloads.