CSV → SQL

Convert CSV to SQL

Drop a CSV and get a ready-to-run CREATE TABLE + INSERT script for PostgreSQL, MySQL, SQL Server, or SQLite — with smart type inference and editable schema. Runs in your browser, nothing uploaded.

Drop or choose your file to start...
Choose a file...

Four databases

PostgreSQL, MySQL, SQL Server, or SQLite — correct types & quoting for each.

CREATE TABLE + INSERT

A complete, ready-to-run script — schema and data together.

Smart type inference

Detects integers, decimals, dates, booleans, and text from your data.

Schema control

Override inferred types, rename columns, and set a primary key.

Millions of rows

Batched INSERTs import cleanly, even into SQL Server's 1,000-row limit.

Private by design

Processed in memory, in your browser, never stored.

How to convert a CSV to SQL

SQLified turns a CSV into a complete SQL script in four steps — no database connection, drivers, or command line needed to build it. You only need your database to run the result.

  1. Drop your CSV onto the converter above (or click to choose a file).
  2. Choose a database and review the inferred schema — adjust types, nullability, rename columns, or set a primary key.
  3. Generate the SQL — a CREATE TABLE plus batched INSERT statements.
  4. Run it in your database client.

Choose your database

SQLified generates dialect-correct SQL for each major database. Jump to a tailored guide:

What the generated SQL looks like

CREATE TABLE IF NOT EXISTS "users" (
  "id" INTEGER NOT NULL,
  "name" TEXT NOT NULL,
  "signup_date" DATE NOT NULL,
  "amount" NUMERIC(18,2) NOT NULL
);

INSERT INTO "users" ("id", "name", "signup_date", "amount") VALUES
('1', 'Ada Lovelace', '2026-01-04', '120.50'),
('2', 'Alan Turing', '2026-02-11', '99.00');

SQLified infers a type for each column from the actual data — integers, decimals, dates, booleans, and text — and you can override any of them before generating.

Built for large files

Where SQLified stands apart is scale: it handles millions of rows entirely in your browser and batches the INSERT output into 1,000-row statements. That keeps each statement within every database's limits — most importantly SQL Server's hard cap of 1,000 rows per INSERT and MySQL's max_allowed_packet — so a huge file imports start to finish instead of failing as one oversized statement.

Frequently asked questions

Does SQLified upload my CSV?

No. The entire conversion runs in your browser — your file is read into memory, turned into SQL, and never sent to a server or stored.

Which database should I pick?

Choose the one you're loading into. SQLified tailors the output: double-quoted identifiers and NUMERIC/TIMESTAMP for Postgres, backticks and an AUTO_INCREMENT key for MySQL, bracket-quoting and DATETIME2 for SQL Server, and type affinity for SQLite.

What does the generated SQL include?

A CREATE TABLE statement with inferred column types, followed by INSERT statements containing your data — batched at 1,000 rows so large files import without errors.

Can it handle large CSV files?

Yes — millions of rows. The batched output keeps each statement small enough for any database, including SQL Server's hard 1,000-row-per-INSERT limit and MySQL's max_allowed_packet.

Can I change the inferred types?

Yes. Override any column's type, rename it, mark it nullable, or set a primary key before generating the script.