Kysely to TypeORM Entity Generator
Transform Kysely TypeScript table interfaces into clean TypeORM entity classes with decorator annotations.
At a glance
Kysely to TypeORM Entity Generator is a free, client-side developer tool that converts Kysely TypeScript table interfaces into TypeORM entity classes annotated with @Entity, @PrimaryGeneratedColumn, @Column, @CreateDateColumn, and @UpdateDateColumn. Processing runs 100% in your browser.
100% Client-Side Kysely to TypeORM Entity Generator
Zero Server UploadsConvert Kysely TypeScript table interfaces into decorated TypeORM TypeScript Entity classes with primary keys, columns, timestamps, and Database mappings.
Primary Key Mapping
Maps Kysely Generated<number> to @PrimaryGeneratedColumn(), Generated<string> to @PrimaryGeneratedColumn('uuid'), and explicit IDs to @PrimaryColumn().
Timestamps & Defaults
Detects createdAt and updatedAt fields and generates @CreateDateColumn() and @UpdateDateColumn(), plus columns with default values.
100% Client-Side Privacy
All AST parsing and code synthesis happen locally in your web browser. Sensitive entity classes and schema structures never touch any remote server.
You May Also Need
Why Use This Kysely to TypeORM Entity Generator?
How to Use Kysely to TypeORM Entity Generator
Paste Kysely Interface
Paste your Kysely table interfaces into the editor or load a preset.
Configure Options
Select your database dialect and class naming preferences.
Copy or Export
Copy the generated TypeORM entity classes or download as a .ts file.
Kysely Table Interface to TypeORM Entity Conversion
The generator detects the UserTable interface and the 'users' table key in the Database interface, annotates the class with @Entity('users'), maps Generated<number> id to @PrimaryGeneratedColumn(), varchar strings to @Column(), and Generated<Date> createdAt to @CreateDateColumn().
export interface UserTable {
id: Generated<number>;
name: string;
email: string;
createdAt: Generated<Date>;
}
export interface Database {
users: UserTable;
}
@Entity('users')
export class User {
@PrimaryGeneratedColumn()
id: number;
@Column({ type: 'varchar' })
name: string;
@Column({ type: 'varchar' })
email: string;
@CreateDateColumn()
createdAt: Date;
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Formats | TYPESCRIPT, 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. Custom complex utility types are mapped to appropriate fallback column types. |
100% Client-Side Privacy Guarantee
Your schema code remains strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
How does this tool unwrap Kysely Generated types?
How are table names determined?
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 .