Excel / CSV to SQL INSERT

Drop a spreadsheet and get clean SQL INSERT statements for MySQL, PostgreSQL, or SQLite. Optional CREATE TABLE, type inference, and batch inserts. Nothing leaves your browser.

Drop an Excel or CSV file, or click to choose

.xlsx, .xls, .csv · up to 25 MB

What This Tool Does

Quickly turn a CSV export or Excel sheet into ready-to-run SQL. Useful for seeding databases, generating fixtures, prototyping a schema, or migrating tabular data between systems.

How It Works

  • Upload an .xlsx, .xls, or .csv file.
  • Headers from row 1 become column names. Each subsequent row becomes one INSERT.
  • Pick your SQL dialect, table name, and output options.
  • Identifiers are quoted per dialect (backticks for MySQL, double quotes for PostgreSQL / SQLite). Strings are safely escaped.
  • Copy the SQL or download it as a .sql file.

Type Inference

  • Integers— columns where every value is a whole number
  • Floats— columns with decimal numbers
  • Booleanstrue / false only
  • Dates & timestamps— ISO-formatted values
  • Everything else falls back to TEXT / VARCHAR

Output Options

  • CREATE TABLE generation with inferred column types
  • Batch insert— many rows per statement (faster for big datasets)
  • INSERT IGNORE — dialect-aware: MySQL INSERT IGNORE, PostgreSQL ON CONFLICT DO NOTHING, SQLite INSERT OR IGNORE
  • Include column names in each statement (off = positional inserts)
  • Empty cells become NULL

Related Tools