Paste or type your JSON object or array into the input panel on the left.
Select your target SQL dialect from the dropdown — PostgreSQL, MySQL, SQLite, or SQL Server.
Configure options such as table name, batch insert size, and whether to generate UPSERT statements.
Click "Convert" or press ⌘↵ to generate the SQL DDL and INSERT statements.
Copy the output with ⌘⇧C or download it as a .sql file for use in your database client.
Supports four major SQL dialects: PostgreSQL, MySQL, SQLite, and SQL Server with dialect-specific syntax
Automatically infers column types from JSON values — INTEGER, BIGINT, NUMERIC, BOOLEAN, TEXT, and TIMESTAMP
Generates CREATE TABLE DDL with appropriate constraints and column definitions
Produces batched INSERT statements configurable by row count for optimal import performance
Optional UPSERT mode (INSERT … ON CONFLICT / INSERT … ON DUPLICATE KEY UPDATE) for idempotent imports
Handles nested JSON objects by flattening them into dot-separated column names
Detects JSON arrays and maps them to TEXT columns with JSON serialization
Proper NULL handling — JSON null values map to SQL NULL, respecting NOT NULL constraints
Processes arrays of objects to derive a unified schema from all rows
Runs entirely in your browser — your data is never uploaded to any server
Keyboard shortcut ⌘↵ to convert instantly, ⌘⇧C to copy output
Shareable URLs encode your input and options for easy collaboration
AI-powered explanations help you understand generated SQL and type inference decisions
The JSON to SQL Converter supports 4 SQL dialects. Select the right dialect for accurate formatting and keyword recognition.