Prisma to Drizzle ORM Converter

Paste your schema.prisma file and get a ready-to-use Drizzle ORM schema. Works 100% in your browser — your schema never leaves this page.

Paste SQL on the left and click Convert

How it works

This tool parses your Prisma schema and generates equivalent Drizzle ORM schema definitions in TypeScript. It auto-detects your database dialect from the datasource block and produces code for PostgreSQL, MySQL, or SQLite.

The conversion happens entirely in your browser — no data is sent to any server.

What's supported

  • All Prisma scalar types: String, Int, BigInt, Float, Decimal, Boolean, DateTime, Json, Bytes
  • Custom enums → pgEnum (Postgres) or TypeScript union types (MySQL/SQLite)
  • Field attributes: @id, @unique, @default, @map, @relation
  • Model attributes: @@map, @@id, @@unique, @@index
  • Auto-increment primary keys → serial() / int().autoincrement()
  • Foreign key relations with onDelete actions
  • Auto-detection of dialect from datasource block
  • Optional and list fields (String?, Post[])

Requires manual attention

  • Composite primary keys (@@id([a, b])) — warning shown, add primaryKey() helper manually
  • @updatedAt — no direct Drizzle equivalent, use .$onUpdate()
  • @default(cuid()) / @default(uuid()) — set with a manual default function
  • Indexes (@@index) — Drizzle syntax differs, add via table callback
  • Composite types and views (Prisma 5+) — not supported yet

Privacy

The converter runs entirely client-side in your browser. Your schema is never sent to our servers, stored, or logged. You can verify this by checking the Network tab in your browser's DevTools.