Prisma Schema to Kysely Interface Generator
Convert Prisma schema models and enums into type-safe Kysely TypeScript interfaces with Generated and ColumnType annotations.
At a glance
Prisma Schema to Kysely Interface Generator is a free developer utility that transforms Prisma schema models into type-safe Kysely TypeScript table interfaces. It accurately maps scalar types, enums, nullable columns, and Generated attributes 100% client-side in browser memory.
100% Client-Side Prisma to Kysely Interface Generator
Zero Server UploadsTransform Prisma schema models and enums into type-safe Kysely TypeScript table interfaces with Generated annotations directly in your browser.
Kysely Generated Annotations
Accurately transforms Prisma @default(autoincrement()), @default(uuid()), @default(now()), and @updatedAt attributes into Kysely Generated<T> types.
Relation Field Filtering
Automatically filters out virtual Prisma ORM relation fields (posts Post[], user User @relation(...)), leaving only concrete database columns in table interfaces.
100% In-Browser Privacy
All parsing, AST analysis, and TypeScript interface generation runs locally in client-side JavaScript memory with zero network requests and zero telemetry.
Why Use This Prisma Schema to Kysely Interface Generator?
How to Use Prisma Schema to Kysely Interface Generator
Input Prisma Schema
Paste your Prisma Schema Language (PSL) models and enums or load a built-in preset.
Configure Generator Options
Customize table suffix (Table, Row, none), DateTime representation (Date or string), and field casing.
Copy or Download Kysely Types
Copy the generated Kysely TypeScript interfaces to your clipboard or download as database.types.ts.
Prisma Schema to Kysely Interface example
Demonstrates converting a Prisma User model into a Kysely UserTable interface with Generated serial ID and default timestamp, nullable name, and root Database interface.
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
createdAt DateTime @default(now())
}
import type { Generated } from 'kysely';
export interface UserTable {
id: Generated<number>;
email: string;
name: string | null;
createdAt: Generated<Date>;
}
export interface Database {
user: UserTable;
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TEXT, PRISMA → TYPESCRIPT, TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Modern browser with JavaScript enabled. |
| Performance Constraints | Runs 100% client-side in browser memory. Performance and file limits are bounded by available local device RAM. |
100% Client-Side Privacy Guarantee
Your files remain strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
How are relation fields handled in Prisma to Kysely conversion?
Why are some column types wrapped in Generated<T>?
Is my Prisma 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 .