Data & JSON

SQL to Entity

Convert MySQL, PostgreSQL, and SQLite CREATE TABLE DDL into Java (Lombok, JPA, MyBatis-Plus), Go structs, TypeScript interfaces, C# classes, or Python dataclasses locally in your browser.

About this tool

Paste MySQL, PostgreSQL, or SQLite CREATE TABLE DDL to parse columns, primary keys, nullability, and comments locally and generate clean entity definitions in real time.

Java output supports Lombok @Data, MyBatis-Plus, JPA @Entity, and plain POJO styles with optional prefix stripping and Swagger @Schema annotations.

Best use cases

  • Turn database schema scripts into Spring Boot, MyBatis-Plus, or Go GORM models without manual boilerplate.
  • Generate TypeScript interfaces directly from SQL DDL to keep frontend types aligned with database columns.
  • Process multi-table DDL files in one pass inside your browser.

How to use it

  1. Choose a target language (Java, Go, TypeScript, C#, or Python) and adjust prefix or annotation options.
  2. Paste CREATE TABLE SQL on the left or import a .sql file.
  3. Copy or download the generated entity code on the right.

Scope and limits

  • Supports up to 200,000 characters, 50 tables, and 500 columns per run.
  • Parses CREATE TABLE and PostgreSQL COMMENT ON statements only without executing queries.

Data processing

All DDL parsing and code generation run locally in your browser; schemas are never uploaded.

FAQ

Which SQL dialects are supported?

Common MySQL, PostgreSQL, and SQLite CREATE TABLE syntax including comments, unsigned integers, and table-level primary keys.

Related tools

More in this category