Paste JSON and click Convert

How to Get CREATE TABLE and INSERT From JSON

This tool converts JSON arrays into SQL commands: CREATE TABLE + INSERT. Useful for quickly migrating example data into a database.

How do I quickly create a table and fill it with data from JSON?

Paste a JSON array of objects (e.g. `[{"id":1,"name":"Alice"}]`) into the input field and click "Generate" — the tool returns ready CREATE TABLE with inferred column types and an INSERT statement with the data.

What happens if objects in the array have different fields?

The resulting table includes the union of all fields across all objects, and objects missing a given field get NULL in that column.

How to use

  • 1

    Paste JSON

    Paste a valid JSON array of objects into the input.

  • 2

    Check the structure

    Make sure objects share the same fields; missing fields will result in NULLs.

  • 3

    Generate SQL

    Click Generate and copy the SQL commands to your database.

FAQ