Intellrise
Free tool

CSV to SQL converter

Paste your CSV — or upload a CSV or Excel file — and get a CREATE TABLE plus the INSERT statements to fill it, for PostgreSQL, MySQL, SQL Server, SQLite or generic ANSI SQL. Column types are inferred from your values rather than guessed from the header. Free, no signup, and the file is read in this browser tab — it is never uploaded.

How it works

  1. Paste CSV text, or choose a .csv, .tsv or .xlsx file — every worksheet in a workbook becomes its own table.
  2. The first row is read as the column names. Duplicate and blank headers are made unique so the DDL still runs.
  3. Each column's type is inferred from the first 500 data rows. Two questions are read over every row instead, because getting them from a sample would change your data rather than mislabel it: whether the column has a blank in it (which decides NOT NULL), and whether any value wears a leading zero (which keeps the column text).
  4. Pick your dialect, then copy the SQL or download it as a .sql file.

Read the types before you run it

Type inference reads what is in the file, and a file does not know what it means. Two kinds of value are deliberately left as text rather than guessed at: anything with a leading zero, so ZIP codes and account numbers survive intact, and any date written with slashes, because 03/04/2024 is 3 April or 4 March depending on who exported it. That still leaves what the guards cannot catch — an identifier without a leading zero, like a nine-digit account number or an EAN, is indistinguishable from a quantity and comes out numeric, and a column holding only whole numbers here can still be a decimal in the source system. Those two are visible in the generated CREATE TABLE, which is why the DDL is printed rather than hidden: change the type there before you run it, or paste the corrected DDL into the data dictionary generator to document what each field is supposed to be.

Loading the spreadsheet was never the point

You are converting this file because the questions you want to ask it are ones a spreadsheet answers badly. The thinking that follows — first answer, next question — is yours, and no tool takes it off you. What Intellrise takes off you is the retyping in between: connect the table you just loaded, or the Google Sheet you were about to convert, type your question, and get the chart back. Every result carries a Show SQL toggle with the query it actually ran, because a number you cannot check is not an answer.

Intellrise is the one-stop AI data analyst for your own database or spreadsheet: one question becomes the SQL, the chart, a dashboard and a report, in one place. Every new account starts on a 14-day Pro trial with no card — nothing to enter, nothing to cancel — and lands on a permanently free tier after it lapses. Every self-serve plan, the trial included, needs an AI key; a Google Gemini key is free to create.

Frequently asked questions

No. The CSV is parsed, and the Excel workbook is read, by JavaScript running in this browser tab — there is no request carrying your data, no account and no login. Close the tab and nothing of it remains.