HomeJSON ConvertersJSON to Prisma

JSON to Prisma

Generate Prisma model from JSON.

Generate Prisma model from JSON.

This tool is designed to provide a seamless experience for developers by handling complex operations directly in your browser with maximum speed and security.

100% Private
Instant Results
Customizable
Offline Ready
Dev-Friendly
Easy Export

It generates a Prisma schema model from a JSON object. It identifies types and structure, creating a clean model definition for your `schema.prisma` file.

Paste your JSON to generate a Prisma `model` definition. The tool will map JSON fields to Prisma types like `Int`, `String`, `Boolean`, and `Json`.

Prisma schemas are strictly typed. This tool helps you quickly define your data models by inferring types from sample JSON, reducing manual typing and potential schema mismatches.

Example Input

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "isActive": true,
  "tags": ["admin", "dev"],
  "profile": {
    "bio": "Software Engineer",
    "skills": ["Go", "React", "TypeScript"]
  }
}

Example Output

model User {
  id       Int      @id @default(autoincrement())
  name     String
  email    String   @unique
  isActive Boolean
  profile  Json
}

Unique Constraints

Fix: The tool might not know which fields should be @unique. Manually add these attributes to the generated model.

Does it support Enums?

It currently maps strings to `String`. You can manually convert these to `enum` types in your Prisma schema.