Load CSV rows into a database

You have a spreadsheet export and need INSERT statements to seed a table. Here is the quick path that handles quoting and NULLs properly.

Tools used in this guide

The job

Seeding a dev database or migrating a small lookup table means turning rows into INSERTs. Doing it by hand invites the classic bug — an apostrophe in 'O'Brien' that silently splits a row.

Convert it

Paste the CSV, set the table name, and run. The first row becomes the column list; values that look numeric stay unquoted, everything else is single-quoted with '' escaping, and empty cells become NULL by default. Batch size controls rows-per-INSERT for large loads.

  • Header off: the tool uses column1, column2… names you can rename in the output.
  • Delimiter auto-detects commas, semicolons, and tabs.

Worked example

name,city,rate + two data rows produces INSERT INTO customers (name, city, rate) VALUES ('Ada''s Bakery', 'London', 4.5), ('Grace', NULL, 3); — the apostrophe survived as '', the blank cell became NULL, the numbers stayed numbers.

Limits

Plain VALUES INSERTs only — no CREATE TABLE, no ON CONFLICT upserts, no dialect-specific syntax. Review the statements before running them against anything you care about. Up to 300,000 characters / 20,000 rows.