CSV to SQL Converter
Turn a CSV file into INSERT and CREATE TABLE statements for MySQL, PostgreSQL, SQLite, or SQL Server. Column types are guessed from your data.
0 characters0 bytes
0 characters0 bytes
The column types are guessed from the data. Read the CREATE TABLE before you run it. Codes such as 007 stay text.
How to Use It
- Choose the database and the table name.
- Paste the CSV with its header row.
- Read the SQL, and copy or download it.
Questions and Answers
Why does the database matter?
Each database quotes names in its own way ("name", `name`, or [name]), and writes booleans and Unicode text differently.
Good to Know
The types are guessed from this data: integer, decimal, boolean, date, timestamp, or text. No primary key or index is made. The SQL is not run.
Related Tools
Source code of this tool (opens in a new tab)Report a problem on GitHub (opens in a new tab)