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.

Universal Switcher:
From:
To:

100% Client-Side TypeORM to Prisma Schema Converter

Zero Server Uploads

Convert TypeORM entity classes, decorators, and relationships into clean, type-safe Prisma schema models instantly in your browser.

Local Browser Sandbox
Presets:
0 entities 0 enums

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?

100% Client-Side Privacy: Your entity code never leaves your device or touches any external server.
Complete Decorator Parsing: Maps @Entity, @PrimaryGeneratedColumn, @Column, @CreateDateColumn, and @UpdateDateColumn.
Relationship Mapping: Converts @OneToMany and @ManyToOne with @JoinColumn into Prisma relation models.
Enum Support: Translates TypeScript enum declarations into native Prisma enum blocks.
Datasource & Generator: Outputs ready-to-run Prisma datasource and client generator blocks.

How to Use TypeORM Entity to Prisma Schema Converter

1

Enter TypeORM Entities

Paste your TypeScript TypeORM entity classes or load a pre-configured template like Users & Posts or E-Commerce.

2

Configure Options

Select your datasource provider (PostgreSQL, MySQL, SQLite) and toggle relation generation.

3

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.

Sample TypeORM Entity Source
@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[];
}
Generated Prisma Schema Processed
model User {
  id         Int @id @default(autoincrement())
  email      String @unique
  name       String?
  posts      Post[]
}

Technical Specifications & Engine Details

Technical specifications and engine details for TypeORM Entity to Prisma Schema Converter
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.
Maintained by Pragyan Pahadi

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?
TypeORM @PrimaryGeneratedColumn() maps to Int @id @default(autoincrement()), @PrimaryGeneratedColumn('uuid') maps to String @id @default(uuid()), and natural @PrimaryColumn() maps to @id.
How are relations and foreign keys handled?
@OneToMany() translates to array relation fields (posts Post[]) and @ManyToOne() with @JoinColumn() generates scalar foreign keys (authorId Int) along with Prisma @relation(fields: [authorId], references: [id]).
Is my entity code kept private?
Yes. All parsing and schema generation runs 100% locally in your browser memory using JavaScript. Zero code or schema information is sent to any server.

Methodology

This tool runs entirely in your browser. The example above shows a representative input and the result it produces.

Last updated .