TypeORM Entity to Prisma Schema Converter
Transform TypeORM entity classes, decorators, and enums into type-safe Prisma schema models and relationships.
At a glance
TypeORM to Prisma Schema Converter is a free developer utility that transforms TypeORM entity classes into type-safe Prisma schema models. It accurately translates primary key decorators, column types, enums, timestamps, and relation mappings 100% client-side in browser memory with zero server uploads.
100% Client-Side TypeORM to Prisma Schema Converter
Zero Server UploadsConvert TypeORM entity classes, decorators, and relationships into clean, type-safe Prisma schema models instantly in your browser.
Primary Keys & UUIDs
Translates @PrimaryGeneratedColumn() to @id @default(autoincrement()), UUID generators to @default(uuid()), and natural keys to @id.
Relations & Foreign Keys
Extracts @OneToMany() and @ManyToOne() decorator relationships, linking scalar foreign keys via Prisma @relation(fields: [...], references: [id]).
100% Client-Side Privacy
Complete AST transformation performed entirely in browser memory. Your private TypeScript entity files never touch an external server or remote API.
Why Use This TypeORM Entity to Prisma Schema Converter?
How to Use TypeORM Entity to Prisma Schema Converter
Enter TypeORM Entities
Paste your TypeScript TypeORM entity classes or load a pre-configured template like Users & Posts or E-Commerce.
Configure Options
Select your datasource provider (PostgreSQL, MySQL, SQLite) and toggle relation generation.
Copy or Download Prisma Schema
Instantly copy the generated schema.prisma code or download the file for your Prisma project.
TypeORM Entity to Prisma Schema example
Demonstrates converting a TypeORM entity class with autoincrement primary key, unique email, nullable name, and one-to-many relationship into a clean Prisma schema model.
@Entity()
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ unique: true })
email: string;
@Column({ nullable: true })
name: string | null;
@OneToMany(() => Post, (post) => post.author)
posts: Post[];
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
posts Post[]
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TEXT/PLAIN, .TS → 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 entity definitions remain strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
How are TypeORM primary keys mapped to Prisma?
How are relations and foreign keys handled?
Is my entity code kept private?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .