Data Tools

Convert CREATE TABLE DDL to Prisma Models

Convert CREATE TABLE DDL into Prisma models in your browser. Common column types plus primary key, autoincrement, and unique markers are recognized. Processing stays local—useful for bootstrapping a schema from an existing database.

SQLPrismaSchema

Favorite this tool

No favorite storage mode has been selected.

Quick actions

Copy this tool URL or open the system share sheet on a supported device.

Use cases

  • Bootstrap Prisma models from MySQL DDL
  • Move legacy CREATE TABLE scripts into a Prisma project
  • Quickly check whether type mappings look reasonable

How to use

  1. Paste DDL that includes CREATE TABLE
  2. Convert
  3. Copy or export the schema.prisma fragment

Example input and output

DDL

CREATE TABLE users (id INT PRIMARY KEY AUTO_INCREMENT, email VARCHAR(255) NOT NULL UNIQUE);

Prisma

model Users {
  id    Int    @id @default(autoincrement())
  email String @unique
}

FAQ

Are foreign keys and complex constraints parsed?

Parsing is lightweight and regex-based. Column definitions and common primary/autoincrement/unique markers are covered; standalone FOREIGN KEY lines may be skipped.

How are table and field names mapped?

Names are converted toward Prisma-style camelCase, with @map / @@map keeping the original SQL names.

Tools

Related tools

Continue with another translated tool for a nearby task.

CSV to SQL Insert

Generate SQL INSERT Statements from CSV

Available

Turn headered CSV into INSERT statements in your browser. Set table name, quote style, empty-value handling, and batch size. Conversion stays local—useful for seed data and bulk-import prep.

CSV SQL Insert

JSON to Zod Schema

Generate Zod Schemas from JSON Samples

Available

Infer a Zod schema from sample JSON in your browser and emit TypeScript validation code. Nested objects and arrays are supported, with optional strict mode and z.infer type export—useful for API validation work.

JSON TypeScript Zod

JSON to TypeScript Interface

JSON to TypeScript Interface Generator

Available

Infer TypeScript interface definitions from JSON in your browser. Nested objects become separate interfaces, with options for the root name, optional fields, readonly, export, and type aliases.

TypeScript JSON Developer