Drizzle to Prisma Schema Converter
Convert Drizzle ORM TypeScript table definitions into clean Prisma schema models and enums.
At a glance
Drizzle to Prisma Schema Converter is a free developer utility that transforms Drizzle ORM TypeScript schemas into Prisma schema models. It maps pgTable, mysqlTable, and sqliteTable definitions, enums, defaults, and primary keys into clean Prisma models 100% client-side in browser memory.
100% Client-Side Drizzle to Prisma Schema Converter
Zero Server UploadsConvert Drizzle ORM TypeScript table definitions and enums into clean, idiomatic Prisma schema models across PostgreSQL, MySQL, and SQLite.
Multi-Dialect Drizzle
Full AST parsing for PostgreSQL (pgTable, serial, uuid), MySQL (mysqlTable, int), and SQLite (sqliteTable, integer).
Enums & Primary Keys
Maps Drizzle pgEnum and mysqlEnum to Prisma enum blocks, transforms autoincrement keys to @id @default(autoincrement()), and UUIDs to @default(uuid()).
100% Client-Side Privacy
Complete AST transformation in browser memory. Your private database schema files never touch an external server or remote API.
Why Use This Drizzle to Prisma Schema Converter?
How to Use Drizzle to Prisma Schema Converter
Enter Drizzle Schema
Paste your Drizzle ORM TypeScript code into the editor or pick one of the preset templates.
Configure Output Options
Select model naming conventions (PascalCase or preserve) and toggle datasource or @@map directives.
Copy or Download Prisma Schema
Copy the converted Prisma schema directly to your clipboard or download it as schema.prisma.
Drizzle Table to Prisma Model example
Demonstrates converting a PostgreSQL Drizzle table with a serial primary key, unique email, and nullable name into an idiomatic Prisma schema model.
export const users = pgTable('users', {
id: serial('id').primaryKey(),
email: varchar('email', { length: 255 }).notNull().unique(),
name: text('name')
});
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TEXT/PLAIN, .TS, .JS → TEXT/PLAIN, .PRISMA |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Modern browser with JavaScript enabled. |
| Performance Constraints | Runs client-side in browser memory. Performance and file limits are bounded by available local device RAM. |
100% Client-Side Privacy Guarantee
Your schema remains strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
Which Drizzle dialects does this converter support?
How are Drizzle primary keys and auto-increment fields mapped?
Is my Drizzle schema kept private?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .