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.

Universal Switcher:
From:
To:

100% Client-Side Kysely to TypeORM Entity Generator

Zero Server Uploads

Convert Kysely TypeScript table interfaces into decorated TypeORM TypeScript Entity classes with primary keys, columns, timestamps, and Database mappings.

Local Browser Sandbox
Presets:
0 interfaces
0 entities

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.

Why Use This Kysely to TypeORM Entity Generator?

Converts Kysely TypeScript interfaces into TypeORM entity classes
Unwraps Generated<T> into @PrimaryGeneratedColumn, @CreateDateColumn, or @Column with defaults
Maps Kysely ColumnType<Select, Insert, Update> to appropriate TypeORM column annotations
Synthesizes clean TypeORM entity classes with singularized PascalCase names and @Entity decorators
100% client-side privacy: schema data never leaves your device

How to Use Kysely to TypeORM Entity Generator

1

Paste Kysely Interface

Paste your Kysely table interfaces into the editor or load a preset.

2

Configure Options

Select your database dialect and class naming preferences.

3

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().

Kysely Interface (TypeScript) Source
export interface UserTable {
  id: Generated<number>;
  name: string;
  email: string;
  createdAt: Generated<Date>;
}

export interface Database {
  users: UserTable;
}
TypeORM Entity (TypeScript) Processed
@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

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

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?
Kysely's Generated<T> wrapper is inspected: Generated<number> on an id field is mapped to @PrimaryGeneratedColumn(), Generated<string> on a UUID field is mapped to @PrimaryGeneratedColumn('uuid'), and Generated<Date> on createdAt is mapped to @CreateDateColumn().
How are table names determined?
If a master Database interface is provided (e.g. users: UserTable), the table name 'users' is used in @Entity('users'). Otherwise, the table name is derived from the interface name.
Is my schema data private?
Yes, 100%. The conversion runs entirely inside your browser's JavaScript engine. No code is transmitted to any external server.

Methodology

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

Last updated .