Inkwell Data / File converter / CSV to SQL
Convert CSV to SQL
Generate a CREATE TABLE statement and INSERT statements from a CSV file, ready to paste into PostgreSQL, MySQL, SQLite or SQL Server.
How it works
Set the table name, and columns are typed NUMERIC when every value is a number and TEXT otherwise. Inserts are batched 500 rows at a time and quotes are escaped for you.
Drop your CSV file above, check the preview, and click Convert & download. SQL is already selected, but you can pick any other format from the list.
Other conversions
Questions
Which databases does the SQL work with?
The statements use standard SQL with double-quoted identifiers, which PostgreSQL, SQLite, DuckDB and Oracle accept as-is. For MySQL, enable ANSI_QUOTES or swap the quotes for backticks; for SQL Server, run SET QUOTED_IDENTIFIER ON.
How are column types chosen?
NUMERIC when every non-blank value is a number, TEXT for everything else, so IDs with leading zeros stay safe.
How are blank cells written?
As NULL.
Are my files uploaded anywhere?
No. The conversion happens in your own browser. There is no server receiving your data, no account and no daily limit.