Skip to content
Developer & CodeLocal · Stays on device

SQL Insert Generator

Turn CSV or JSON into INSERT statements, or a CREATE TABLE with inferred column types, for PostgreSQL, MySQL, SQLite or SQL Server.

  • CSV with header, JSON array of objects, PostgreSQL / MySQL / SQLite / SQL Server output
  • Free to use
  • No sign-up or watermark
sql-insert-generatorOn this device
1
2
3
4
5
6
7
8
9
10
1
2
3
4
5
6
7
8
9
10
CSV with headerJSON array of objectsPostgreSQL / MySQL / SQLite / SQL Server output
Open SQL Insert Generator

Not yet professionally reviewed. This tool’s formulas and wording have not been checked by a qualified professional. Use the results as an estimate and verify anything important.

Column types are guessed from the sample you paste; review them before creating production tables. Generated SQL is for loading data you trust; for user input at runtime, use parameterised queries.

About this tool

Paste CSV with a header row, or a JSON array of objects, choose the dialect and table name, and get multi-row INSERT statements. Strings are escaped correctly for each database (doubled quotes everywhere, and doubled backslashes for MySQL, which treats \ as an escape), numbers and booleans are written unquoted, and empty cells can become NULL. Large inputs are split into batches; SQL Server's limit of 1,000 rows per VALUES list is applied automatically.

Switch the output to CREATE TABLE (or both) to get a table definition with column types inferred from the data: integer, bigint, decimal with precision and scale, float, boolean, date, timestamp or text/varchar, mapped to each dialect's type names. Column names are cleaned into safe identifiers, and you can pick a primary key. Everything runs in your browser. What you paste is never uploaded, logged or stored.

  1. Input

    Your code or text

    CSV with header, JSON array of objects, PostgreSQL / MySQL / SQLite / SQL Server output

  2. Processing

    Processed in this browser

    Instant, in-browser. Nothing is uploaded.

  3. Output

    Your result

    Ready to download or copy

Local processing pipelineInstant, in-browser

How to use it

  1. 1

    Paste CSV or JSON.

  2. 2

    Choose the dialect, table name and output (INSERT, CREATE TABLE or both).

  3. 3

    Check the detected column types, then copy or download the .sql file.

Zero-upload architecture

How to use SQL Insert Generator for free, with no upload

Free, with no sign-up or watermark · Your files stay on your device

  1. 1

    Open SQL Insert Generator

    Launch the app and add your file. There is nothing to install and no account to create.

  2. 2

    Work through it

    Choose the dialect, table name and output (INSERT, CREATE TABLE or both).

  3. 3

    Get your result

    Check the detected column types, then copy or download the .sql file.

  • Local

    SQL Query Validator

    Check SQL for unclosed strings, unbalanced brackets, clause order, trailing commas, = NULL, UPDATE without WHERE and dialect mistakes.

    Open tool
  • Local

    CSV Viewer

    Open large CSV and TSV files as a sortable, searchable table without Excel.

    Open tool
  • Local

    JSON to CSV

    Convert JSON arrays to CSV, flattening nested objects into columns, ready for Excel.

    Open tool
  • Local

    SQL Formatter

    Beautify SQL queries with consistent indentation and keyword case for 16 database dialects.

    Open tool