Generate SQL INSERT Statements from JSON Online

Overview

Seeding a database from a JSON file usually means writing a script. This tool skips the script: paste your JSON array, enter the table name, and get SQL INSERT statements ready to run. Useful for test data, demo databases, and one-off migrations.

How to Use This Tool

Paste your JSON array. Enter the target table name. Select your SQL dialect (MySQL, PostgreSQL, or SQLite). Click Generate SQL. Copy the INSERT statements and run them in your database client.

Ready to get started? It's free, no registration required, and your files never leave your device.

PDF Tool

Frequently Asked Questions

Does the tool handle NULL values in JSON?

Yes. JSON null values become SQL NULL in the INSERT statements. Boolean values become 1/0 for MySQL and TRUE/FALSE for PostgreSQL.

Can I generate INSERT OR REPLACE statements for upserts?

Select the SQLite dialect and check the 'Use INSERT OR REPLACE' option for upsert semantics. For MySQL, the tool can generate INSERT ... ON DUPLICATE KEY UPDATE instead.

What is the limit on rows the tool can handle?

The tool generates SQL for arrays up to a few thousand rows. For larger datasets, it splits into batches of 500 rows with separate INSERT statements to avoid query size limits.