Tested tool guide
Tested browser tools
Checked August 16, 2026
What SQL DDL to JSON Schema does, with a checked example
Paste a CREATE TABLE statement and the tool returns a JSON Schema document that describes the shape of one row of that table. Everything happens in the browser; the DDL never leaves your machine. It reads the statement, maps each column type (INTEGER to integer, VARCHAR to string, BOOLEAN to boolean) and carries constraints into schema keywords: NOT NULL columns land in the required array, a length argument becomes maxLength, and a DEFAULT value becomes the default keyword. The surprise is nullability: SQL columns are nullable by default, and a schema that types such a column as string rejects the null values the database happily stores.
Worked example
A concrete input and expected output from the current implementation.
Input
CREATE TABLE users (
id INTEGER PRIMARY KEY,
name VARCHAR(50) NOT NULL,
age INTEGER
);
->
Expected output
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string", "maxLength": 50 },
"age": { "type": "integer" }
},
"required": ["id", "name"]
} VARCHAR(50) becomes a string capped at 50 characters, INTEGER maps to integer, and the two columns the database will not leave empty - id (PRIMARY KEY) and name (NOT NULL) - are collected into the required array. age stays out of required because a column without NOT NULL may hold NULL, mirroring the table's own rule.