← All tools
Free tool

CSV to SQL converter

Drop in a CSV and get a PostgreSQL CREATE TABLE with detected column types, plus INSERT statements for every row. Runs entirely in your browser, your file never uploads.

input.csv · 3 rows
output.sql · id: integer, name: text, email: text, signup_date: date, is_active: boolean, score: double precision
CREATE TABLE imported (
  id integer PRIMARY KEY NOT NULL,
  name text NOT NULL,
  email text,
  signup_date date NOT NULL,
  is_active boolean NOT NULL,
  score double precision NOT NULL
);

INSERT INTO imported (id, name, email, signup_date, is_active, score) VALUES
(1, 'Ada Lovelace', 'ada@example.com', '2024-01-15', TRUE, 98.5),
(2, 'Grace Hopper', 'grace@example.com', '2024-02-20', TRUE, 87),
(3, 'Alan Turing', NULL, '2024-03-10', FALSE, 92.25);

Frequently asked questions

Related tools

Turn it into an ER diagram

Paste your PostgreSQL connection string and get an interactive ER diagram of your own schema in under 10 seconds. No signup required.