SQL schema to TypeORM entity
Turn CREATE TABLE statements into TypeORM entity classes with decorators and relations.
SQL schema to TypeORM entity
Paste one or more SQL CREATE TABLE statements and this tool returns TypeORM entity classes ready to drop into a NestJS or Node.js project — @Entity, @Column, @PrimaryGeneratedColumn and the relation decorators TypeORM expects, generated straight from the schema you already have.
Options control how the classes come out: pick postgres, mysql or sqlite as the target database, since column type names such as uuid, jsonb or tinyint only exist on some of them. Foreign keys become @ManyToOne and @OneToMany pairs, and a pure junction table — two foreign keys and nothing else — collapses into a proper @ManyToMany with @JoinTable. Snake_case columns can be mapped to camelCase properties automatically, with a name option added wherever the two differ, and indexes and unique constraints render as class-level @Index and @Unique decorators. Turn off default values or relation detection when you only want the bare column shape.
The parser understands quoted identifiers, inline and table-level foreign keys, CHECK and COMMENT clauses, and both Unix and Windows line endings, so a schema dump copied from psql, mysqldump or a migration file works as-is. Very large schemas are handled too, though generated code above 10 MB returns a message asking you to shorten the input rather than freezing the tab.
Everything runs in your browser — no schema, table name or column ever leaves your device. Copy the result, download it as a .txt file to split into per-file entities yourself, or send it straight back into the input to keep refining the same schema.