SQL Insert Generator from CSV or JSON
Convert CSV or JSON rows into SQL INSERT statements in your browser.
Paste CSV or JSON data, choose a table name, and generate copy-ready SQL INSERT statements locally in your browser. No rows are uploaded or sent to a server.
Use CSV with a header row, JSON arrays of objects, a single JSON object, or JSON arrays of arrays. Values stay on this page.
Leave blank to use headers or JSON keys. Add one column per line, or use source => target_column to rename output columns.
How to use this SQL insert generator
Provide a table name, paste CSV or JSON rows, then generate SQL. CSV input can use a header row for column names. JSON input can be a single object, an array of objects, or an array of arrays when you also provide column names.
Use the optional mapping box when you need to reorder columns, keep only selected fields, or rename a source field in the generated statements. Batching controls how many value rows are placed in each INSERT statement.
The output is intended for review, migration drafts, seed data, and small-to-moderate imports. It does not connect to a database, check constraints, infer data types from CSV strings, or guarantee that the target table exists.
Common gotchas
- Review generated SQL before running it, especially when importing untrusted source data or writing into production tables.
- CSV values are emitted as strings except for empty fields that you choose to convert to
NULL. JSON numbers, booleans, and nulls keep their SQL literal forms. - Identifier quoting varies by SQL dialect. Choose the preset that matches your destination database, and adjust table names or schema names before execution.