Drizzle to TypeORM Entity Converter
Transform Drizzle ORM table definitions into clean TypeORM entity classes with decorators and relationship mappings.
At a glance
Drizzle to TypeORM Entity Converter is a free, client-side utility that transforms Drizzle ORM table definitions into TypeScript TypeORM Entity classes with @Entity, @PrimaryGeneratedColumn, @Column, and relationship decorators. Processing runs 100% in your browser with complete privacy.
100% Client-Side Drizzle to TypeORM Entity Converter
Zero Server UploadsConvert Drizzle ORM schemas into decorated TypeORM TypeScript Entity classes with primary keys, columns, timestamps, and relationships.
Multi-Dialect Drizzle
Supports PostgreSQL (pgTable), MySQL (mysqlTable), and SQLite (sqliteTable) table schemas, including serial, UUID, autoincrement, and native enum helpers.
Relations & Lifecycle Decorators
Translates Drizzle .references() to TypeORM @ManyToOne() and @JoinColumn(), while converting .defaultNow() to @CreateDateColumn().
100% Client-Side Privacy
All AST parsing and TypeScript code synthesis execute inside your browser's JavaScript sandbox. No database schemas are ever transmitted over the network.
Why Use This Drizzle to TypeORM Entity Converter?
How to Use Drizzle to TypeORM Entity Converter
Paste Drizzle Schema
Paste your Drizzle table definitions into the schema input panel or load an example preset.
Configure Options
Select your database dialect and naming convention preferences.
Copy or Export
Click Copy to Clipboard or download the converted TypeORM entity as a .ts file.
Drizzle pgTable to TypeORM Entity Conversion
The converter detects the pgTable declaration, transforms the table name to PascalCase 'User', annotates the class with @Entity('users'), maps serial primary keys to @PrimaryGeneratedColumn(), varchar strings to @Column(), and timestamp defaultNow() to @CreateDateColumn().
export const users = pgTable('users', {
id: serial('id').primaryKey(),
name: varchar('name', { length: 255 }).notNull(),
email: varchar('email', { length: 255 }).notNull().unique(),
createdAt: timestamp('created_at').defaultNow().notNull()
});
@Entity('users')
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ type: 'varchar', length: 255 })
name: string;
@Column({ type: 'varchar', length: 255, unique: true })
email: string;
@CreateDateColumn()
createdAt: Date;
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TYPESCRIPT, JAVASCRIPT, TEXT → TYPESCRIPT, TEXT |
| Execution Mode | 100% Client-Side In-Browser (client) |
| Browser Requirements | Modern browser with ES2020 JavaScript support. |
| Performance Constraints | Pure client-side conversion. Complex custom SQL expressions are preserved as comments. |
100% Client-Side Privacy Guarantee
Your schema code remains strictly on your local machine. Zero data is uploaded or logged.
Frequently Asked Questions
How does this tool map Drizzle column types to TypeORM?
Does it support Drizzle relations?
Is my schema data private?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .