Skip to content

CSV to SQL Converter

Generate SQL INSERT statements, and optionally a CREATE TABLE with inferred column types, from CSV data.

Runs in your browserCSV → SQL
Loading tool…

Example

Input
id,name
1,O'Brien
2,
Output
INSERT INTO my_table (id, name) VALUES (1, 'O''Brien');
INSERT INTO my_table (id, name) VALUES (2, NULL);

How to use the CSV to SQL Converter

  1. Paste or type your CSV into the input area, or open a file from your device.
  2. Adjust the options above the editor if the tool offers any.
  3. Review the SQL result, then copy it or download it as a file.

Privacy and limitations

  • Your data is processed on your device and is not uploaded to any server.
  • Empty cells become NULL.

Frequently asked questions

How are column types chosen for CREATE TABLE?

Each column gets the narrowest type that fits every non-empty value: BOOLEAN, INTEGER, BIGINT, NUMERIC, VARCHAR(n) up to 255 characters, otherwise TEXT. Review them before running the script.

Browse all csv & tsv tools →