Docelora
ToolsAboutContact
Developer tools

JSON to SQL

Load JSON data from an API or export into a database by turning an array of objects into a CREATE TABLE and INSERT statements for MySQL, PostgreSQL, SQLite or SQL Server.

Quick answer: paste a JSON array such as [{"id":1,"name":"Ana"}]. Every key seen in any object becomes a column; missing keys and null become NULL; nested objects and arrays are written as JSON text.

JSON to SQL

Array of objects → INSERT

Runs on your device: everything you type or open is processed in this browser tab. Nothing is uploaded to Docelora or anyone else.

What input works

An array of objects is ideal. If you paste an object that contains an array (for example an API response with a “data” or “items” list), that array is used. A single object becomes a single row.

1. Paste JSONArray of objects.
2. Choose dialectAnd table name.
3. Copy SQLRun it in your database client.

Related tools

Frequently asked questions

What JSON shape is needed?

An array of objects, or an object containing one.

What if objects have different keys?

All keys become columns; missing ones are NULL.

How are nested objects stored?

As JSON text – use a JSON column type if your database supports it.

Are booleans converted?

Yes – TRUE/FALSE, or 1/0 for SQL Server.

Are types inferred?

Yes, from all values in each column.

Which databases?

MySQL, PostgreSQL, SQLite and SQL Server.

Are strings escaped?

Yes.

Does it create indexes?

No.

Can I skip CREATE TABLE?

Untick it.

What about very long text?

Columns over 255 characters use TEXT or NVARCHAR(MAX).

Does key order matter?

Columns follow the order keys first appear.

Are dates detected?

No – stored as text.

Can I convert CSV?

Use CSV to SQL.

Large files?

Tens of thousands of rows are fine.

Is my data uploaded?

No.

Is my code uploaded?

No – it is processed in your browser and never leaves your device.

Is it free?

Yes, with no sign-up or limits.

Can I open a file?

Yes – use “Open file”, or paste the code.

Does it work offline?

Once the page and its library have loaded, yes.

Can I copy or download the result?

Copy it with one click, or download where offered.

Last reviewed: 8 November 2026.