Schemint

paste PostgreSQL or JSON, get your schema reviewed like a senior would

JSON to Prisma schema

Paste a JSON payload, get Prisma models. Nothing you paste is stored.

Paste a JSON payload (an object or an array of objects) and get Prisma models for schema.prisma. Types are inferred from the actual values, fields missing or null in some records come out optional (?), and nested objects become their own related models.

Inferred from the payload you paste, on the server, discarded after the response.

Try it on your own JSON

Example

JSON in:

[
  {"id": 1, "sku": "A-100", "name": "Widget", "price": 9.99, "in_stock": true, "created_at": "2024-01-15T10:30:00Z"},
  {"id": 2, "sku": "B-220", "name": "Gadget", "price": 19.5, "in_stock": false, "created_at": "2024-02-01T08:00:00Z"}
]

Generated:

schema.prisma

model Payload {
  id        BigInt   @id
  sku       String   @db.Text
  name      String   @db.Text
  price     Float
  inStock   Boolean  @map("in_stock")
  createdAt DateTime @map("created_at")

  @@map("payload")
}

Related