Converting document-oriented JSON into relational SQL requires inspecting sample records, determining optimal column data types, and synthesizing DDL.
1. Supported SQL Dialects
- PostgreSQL: Uses
SERIAL PRIMARY KEY,VARCHAR,BOOLEAN,TIMESTAMP WITH TIME ZONE,JSONB. - MySQL: Uses
AUTO_INCREMENT,DATETIME,TEXT,JSON. - SQLite: Uses
INTEGER PRIMARY KEY AUTOINCREMENT,TEXT,REAL.
-- Generated PostgreSQL DDL
CREATE TABLE users (
id INT PRIMARY KEY,
name VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
-- Generated INSERT DML
INSERT INTO users (id, name, email, is_active) VALUES
(1, 'Alice Smith', 'alice@example.com', true),
(2, 'Bob Jones', 'bob@example.com', false);
Put this into practice with the JSON to SQL
Runs entirely in your browser — no upload, no signup, and your data never leaves your device.
Open JSON to SQL →