About this tool
The JSON to SQL CREATE TABLE tool reads a JSON array of objects (or a single object) and infers a matching SQL table definition, choosing each column's type from the values it actually sees. It runs entirely in your browser — the JSON is parsed with the native JSON.parse and never leaves your device — so you can paste an API dump or a database export and scaffold a table in one step.
Column types are inferred per field across every row: values that are all whole numbers become INT (BIGINT when any value exceeds 2,147,483,647), numbers with decimals become DECIMAL(p,s) sized to the widest integer and fraction digit counts you supplied (or DOUBLE / REAL when you pick the float mode), booleans map to TINYINT(1)/BOOLEAN, ISO 8601 strings map to DATETIME or DATE, nested objects and arrays become JSON/JSONB, and remaining strings become VARCHAR(N) where N is the next power of two above the longest value (TEXT once that exceeds 255). A column that is null or missing in any row is left NULLABLE; otherwise it is NOT NULL. A unique, non-null column named id or uuid is promoted to the PRIMARY KEY, with AUTO_INCREMENT / SERIAL / AUTOINCREMENT added for integer keys.
A dialect toggle rewrites the types for MySQL, PostgreSQL (SERIAL, JSONB, TIMESTAMP, DOUBLE PRECISION), or SQLite (INTEGER / REAL / TEXT affinities) and quotes identifiers with the right delimiter (backticks for MySQL, double quotes elsewhere). Turn on the INSERTs option to also emit one INSERT statement per row, with strings, booleans, numbers, and JSON values escaped and quoted for the chosen dialect.