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.
- Drop your CSV onto the converter above (or click to choose a file).
- Choose a database and review the inferred schema — adjust types, nullability, rename columns, or set a primary key.
- Generate the SQL — a
CREATE TABLEplus batchedINSERTstatements. - Run it in your database client.
Choose your database
SQLified generates dialect-correct SQL for each major database. Jump to a tailored guide:
- CSV to PostgreSQL — double-quoted identifiers, NUMERIC & TIMESTAMP, COPY vs INSERT.
- CSV to MySQL — backticks, an AUTO_INCREMENT key, max_allowed_packet.
- CSV to SQL Server — bracket-quoting, DATETIME2, the 1,000-row limit.
- CSV to SQLite — type affinity, serverless, no install.
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.