About JSON to SQL
JSON to SQL turns an API response, a fixture file or a NoSQL export into statements a relational database can run. Paste the JSON or open a file and the SQL is written as you type: each object becomes a row, each key a column, and nested objects are flattened into columns such as address.city. If the data sits in a spreadsheet or CSV instead, Excel to SQL does the same job.
Choose MySQL, PostgreSQL, SQLite, SQL Server or Oracle under Database and identifiers are quoted the right way for it. Include CREATE TABLE adds a table definition with types picked from the values: integers, decimals, booleans or text of a fitting length. Strings are escaped, null and empty values become NULL, and rows are grouped 100 per INSERT unless you change it under More options. The JSON stays in your browser the whole time.
How to use JSON to SQL
- 1Paste or open the JSON
Paste an array of objects into Input, or open a .json file; Example loads two sample rows.
- 2Set the database options
Pick the Database and enter a Table name. Include CREATE TABLE is on, for a table that doesn't exist yet.
- 3Copy the SQL
The JSON to SQL output updates live. Copy it or Save it as a .sql file.
Why use Cubfile for this
- Right quoting per database
Backticks, double quotes or square brackets, and uppercase names for Oracle.
- Types inferred
BIGINT for large integers, BIT for SQL Server booleans, VARCHAR2 for Oracle text and so on.
- Nested JSON handled
Nested objects become dotted columns, and lists of simple values are stored as one text value.
- Stays on your device
No upload and no task count, so it's fine for real customer data.