Skip to content

Data

CSV & JSON to SQL Inserts

Generate PostgreSQL, MySQL or SQLite INSERT statements from CSV or a flat JSON array, with quoted identifiers.

How to use this tool
  1. Choose the input format and paste records with their column names.
  2. Select a dialect and table name; optionally include a starter schema.
  3. Generate and review the script before importing it yourself.

Loading tool…

Find this tool in

About this tool

What is CSV & JSON to SQL Inserts?

Prepare a small data import as SQL for PostgreSQL, MySQL or SQLite. Choose the input representation and target dialect, then inspect table names, column names and value types. Generated INSERT statements are literal import scripts; they are not parameterized application queries or a substitute for a reviewed migration.

A worked example

Keep a typed JSON quantity numeric in SQL

Example input

[{"name":"Alex","qty":2}]

Expected result

('Alex', 2)

Choose JSON input, SQLite and a target table, then generate SQL. This output excerpt is the row's VALUES tuple: the name is quoted as text and the JSON number remains numeric. CSV input preserves cells as text instead. Review the full INSERT and any optional CREATE TABLE statement before executing an import.

Common mistakes and limits

  • A starter table definition cannot infer indexes, foreign keys, precision requirements or all constraints from a few records.
  • Test imports in a recoverable environment. Correct escaping alone does not prevent duplicate rows or an unintended target table.

Features

What you can do

  • CSV text cells or typed JSON scalar records
  • PostgreSQL, MySQL and SQLite literal handling
  • Optional starter schema and downloadable SQL

Frequently asked questions

Questions about CSV & JSON to SQL Inserts

Which data and limits does CSV & JSON to SQL Inserts support?

Generates text only and never executes SQL. CSV cells remain text; missing JSON fields become NULL, while nested objects/arrays are rejected. MySQL strings use UTF-8 hex literals. Identifier limits follow the selected dialect; generated schemas omit application constraints and must be reviewed.

Related tools