SQL to TypeORM Entity Generator

Convert SQL CREATE TABLE statements into TypeScript TypeORM entity classes with decorators for NestJS and Node.js.

At a glance

SQL to TypeORM Entity Generator is a free developer utility that transforms SQL CREATE TABLE DDL statements into TypeScript TypeORM entity classes. It generates @Entity(), @PrimaryGeneratedColumn(), @Column(), @CreateDateColumn(), and @UpdateDateColumn() decorators with accurate types 100% client-side in browser memory.

Universal Switcher:
From:
To:

100% Client-Side SQL to TypeORM Entity Generator

Zero Server Uploads

Convert raw SQL CREATE TABLE DDL queries into TypeScript TypeORM entity classes with decorators (@Entity, @PrimaryGeneratedColumn, @Column, @CreateDateColumn) directly in browser memory.

Local Sandbox
Presets:
0 chars
Speed: < 1 ms

Why Use This SQL to TypeORM Entity Generator?

100% Client-Side Privacy: Your database schema and DDL queries never leave your local browser.
Comprehensive Decorator Support: Maps @Entity(), @PrimaryGeneratedColumn(), @Column(), @CreateDateColumn(), and @UpdateDateColumn().
Accurate TypeScript Types: Produces typed properties with string, number, boolean, Date, and Record<string, any>.
Multi-Table Batch Processing: Convert multiple CREATE TABLE DDL blocks into separate entity classes in one go.

How to Use SQL to TypeORM Entity Generator

1

Input SQL DDL

Paste your SQL CREATE TABLE statements or upload a .sql file into the input pane.

2

Configure Options

Toggle optional entity constructor generation or TypeORM import statements.

3

Copy TypeORM Entity

Instantly preview, copy, or download the generated TypeScript TypeORM entity class code.

SQL to TypeORM Conversion example

Demonstrates converting an SQL CREATE TABLE statement into a TypeScript TypeORM entity class with decorators.

SQL CREATE TABLE Statement Source
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Generated TypeORM Entity Class Processed
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';

@Entity('users')
export class User {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', length: 255 })
  name: string;

  @CreateDateColumn()
  createdAt: Date;
}

Technical Specifications & Engine Details

Technical specifications and engine details for SQL to TypeORM Entity Generator
Specification Details
Supported Formats SQL, TEXT → TYPESCRIPT, TEXT
Execution Mode 100% Client-Side In-Browser (client)
Browser Requirements Modern browser with JavaScript enabled.
Performance Constraints Runs 100% client-side in browser memory. Bounded only by local device RAM.
Maintained by Pragyan Pahadi

100% Client-Side Privacy Guarantee

Your database DDL statements remain strictly on your local device. Zero data is transmitted to external servers.

Frequently Asked Questions

Does SQL to TypeORM Entity Generator require an active database connection?
No. The conversion executes purely via static in-browser AST parsing without needing database connectivity or credentials.
Does it work with NestJS?
Yes. The generated entity classes use standard TypeORM decorators (@Entity, @Column, @PrimaryGeneratedColumn) fully compatible with NestJS and TypeORM v0.3+.
Is my schema code secure?
Yes. All parsing and code generation run 100% client-side in your browser sandbox. No queries are uploaded or logged.

Methodology

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

Last updated .