SQL DDL to JSON Schema Converter
Transform SQL CREATE TABLE statements into standardized JSON Schema specifications.
At a glance
SQL DDL to JSON Schema Converter is a free developer utility that reverse-engineers PostgreSQL, MySQL, and SQLite CREATE TABLE DDL into standardized JSON Schema (Draft 2020-12 and Draft-07). It maps column data types, formats, NOT NULL constraints, enums, and defaults 100% client-side in browser memory.
100% Client-Side SQL DDL to JSON Schema Converter
Zero Server UploadsReverse-engineer PostgreSQL, MySQL, and SQLite CREATE TABLE statements into standardized JSON Schema (Draft 2020-12 / Draft-07) with nullability, formats, constraints, and defaults.
Why Use This SQL DDL to JSON Schema Converter?
How to Use SQL DDL to JSON Schema Converter
Input SQL DDL
Paste your SQL CREATE TABLE statements into the editor or load a database preset.
Configure Options
Choose your preferred JSON Schema draft (2020-12 or Draft-07) and toggle explicit null unions.
Copy or Download
Copy the generated JSON Schema or download it directly as schema.json.
PostgreSQL CREATE TABLE to JSON Schema example
Converts a PostgreSQL users table into a JSON Schema User model with required fields, maxLength constraints, and format annotations.
CREATE TABLE "users" ( "id" SERIAL PRIMARY KEY, "name" VARCHAR(100) NOT NULL, "email" VARCHAR(255) NOT NULL, "bio" TEXT );
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "User",
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string", "maxLength": 100 },
"email": { "type": "string", "maxLength": 255, "format": "email" },
"bio": { "type": "string" }
},
"required": ["id", "name", "email"]
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported SQL Dialects | PostgreSQL, MySQL / MariaDB, SQLite, ANSI SQL |
| Supported JSON Schema Drafts | Draft 2020-12 ($defs), Draft-07 (definitions) |
| Execution Mode | 100% Client-Side In-Browser (Zero server latency) |
| Nullability Mapping | NOT NULL columns → required array, optional → omitted or union with null |
| Extracted Constraints | maxLength, format (uuid, date-time, date, time), enum, default, description |
100% Client-Side Privacy Guarantee
Your files remain strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
How are SQL column data types mapped to JSON Schema?
How does SQL nullability map to JSON Schema?
How are multiple tables represented in JSON Schema?
Is any SQL schema data sent to external servers?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .