JSON to SQL

Turn JSON records into CREATE TABLE and INSERT statements for MySQL, PostgreSQL or SQLite.

Generate SQL from JSON

Generated: —
Identifiers are quoted for the selected dialect, nested values are stored as JSON text and strings are escaped.

How to use the JSON to SQL

  1. Paste a JSON object, or an array of objects, as your rows.
  2. Choose the SQL dialect and enter the table name.
  3. Press Generate SQL, then copy the CREATE TABLE and INSERT statements.

Features

Advertisement

Frequently Asked Questions

Common questions about the free online json to sql.

Paste JSON rows, pick your dialect and press Generate SQL to get a CREATE TABLE plus INSERT statements.
MySQL, PostgreSQL and SQLite are supported, with identifier quoting, data types and boolean literals adjusted for each dialect.
Each column is scanned across all rows: whole numbers become integers, decimals become floats, booleans become booleans and other values become text.
Nested structures are stored as JSON text in a JSON or text column, which keeps the output valid on every dialect.
String values have single quotes doubled, and MySQL output also escapes backslashes so statements paste in safely.
Yes. Null values are written as NULL and the matching column is left nullable instead of getting a NOT NULL constraint.
Yes. Keep the multi-row option ticked to combine rows into one INSERT, or untick it for one statement per row.
No. All parsing, type inference and escaping happen in your browser, so nothing you paste is sent anywhere.
Yes. The generator is free to use with no account, no limits and no watermark.

Last updated: October 10, 2026