Prisma Schema to TypeORM Entity Converter

Transform Prisma models and enums into decorated TypeORM TypeScript entities with primary keys, column options, and relation decorators.

At a glance

Prisma to TypeORM Entity Converter is a free developer utility that transforms Prisma schema models into decorated TypeORM TypeScript entity classes. It accurately translates @id generators, column types, enums, timestamps, and relation mappings 100% client-side in browser memory with zero server uploads.

Universal Switcher:
From:
To:

100% Client-Side Prisma to TypeORM Entity Converter

Zero Server Uploads

Convert Prisma models, enums, relations, and primary keys into decorated TypeORM TypeScript entities for NestJS and Node.js applications.

Local Browser Sandbox
Presets:
0 models 0 enums

Primary Keys & Generators

Maps Prisma @default(autoincrement()) to @PrimaryGeneratedColumn(), UUID/CUID generators to @PrimaryGeneratedColumn('uuid'), and natural IDs to @PrimaryColumn().

Relations & Timestamps

Translates model relation attributes to @OneToMany(), @ManyToOne(), and @JoinColumn(), while mapping @default(now()) and @updatedAt to lifecycle timestamp decorators.

100% Client-Side Privacy

Complete AST transformation performed entirely in browser memory. Your private database schema files never touch an external server or remote API.

Why Use This Prisma Schema to TypeORM Entity Converter?

100% Client-Side Privacy: Your schema definitions never leave your device or reach external servers.
Complete Decorator Mapping: Generates @Entity, @PrimaryGeneratedColumn, @Column, @CreateDateColumn, and @UpdateDateColumn.
Relation Mapping: Translates model relations to @OneToMany, @ManyToOne, and @JoinColumn with typed arrow functions.
Enum Support: Converts Prisma enums into TypeScript enums and maps @Column({ type: 'enum', enum: EnumName }).
Nullability & Defaults: Preserves nullable fields with TypeScript union types and maps @default values.

How to Use Prisma Schema to TypeORM Entity Converter

1

Enter Prisma Schema

Paste your Prisma schema models or choose a pre-configured template like Users & Posts or E-Commerce.

2

Configure Generation Options

Toggle TypeORM imports, relation decorators, and select your target JSON column dialect (jsonb or json).

3

Copy or Download Entities

Instantly copy the generated TypeORM TypeScript entity classes or download the entities.ts file.

Prisma Model to TypeORM Entity example

Demonstrates converting a Prisma model with autoincrement primary key, unique email, nullable name, and one-to-many relationship into a decorated TypeORM TypeScript entity class.

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

Technical Specifications & Engine Details

Technical specifications and engine details for Prisma Schema to TypeORM Entity Converter
Specification Details
Supported Formats TEXT/PLAIN, .PRISMA → TEXT/TYPESCRIPT, .TS
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 schema remains strictly on your local device. Zero data is transmitted to external servers.

Frequently Asked Questions

How are Prisma relation attributes mapped to TypeORM?
Virtual Prisma relation fields (such as posts Post[] or user User @relation(...)) are converted into TypeORM relation decorators: array fields become @OneToMany(() => Target, inverse) and single relation fields become @ManyToOne(() => Target, inverse) with @JoinColumn().
How are primary keys and autoincrements handled?
Prisma fields marked with @id @default(autoincrement()) map to TypeORM @PrimaryGeneratedColumn(), UUID defaults map to @PrimaryGeneratedColumn('uuid'), and non-generated IDs map to @PrimaryColumn().
Is my database schema uploaded to any server?
No. All parsing and TypeScript code generation executes 100% client-side in your browser memory. No schema data or network requests are ever transmitted.

Methodology

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

Last updated .