Convert CSV to SQL

Form for CSV converting to SQL

This form allows you convert CSV to SQL queries, paste or upload your CSV file below:


CSV configuration:
SQL configuration:

Your result can be seen below.

Result of CSV conversion to SQL


Move to "Paste Code" for Save it

About CSV conversion to SQL

About CSV data conversion to SQL queries

The CSV to SQL Converter was created for online transform CSV(Comma Separated Values) data into SQL(Structured Query Language) queries to insert in the database. This awesome tool supports custom CSV column delimiters, custom table name and several MySQL commands to insert.

As a result, you will receive several queries:

  • SQL query to create a table. But this is just an example of "create table"; in fact, it is not recommended to execute this query, because it does not contain indexes, keys, valid types, etc.
  • Insert or Replace queries.

How it Works?

Just select the options you need and paste your CSV data to the textarea above and click to the button "Convert" and you will instantly get SQL queries.

Example of CSV conversion to SQL

Before:
Name,Email,Phone Number,Address,Age
Bob Smith,bob@example.com,123-456-7890,123 Fake Street,21
Mike Jones,mike@example.com,098-765-4321,321 Fake Avenue,45
After:
/* INSERT QUERY NO: 1 */
INSERT INTO table_name(`Name`, `Email`, `Phone_Number`, `Address`, `Age`)
VALUES ('Bob Smith', 'bob@example.com', '123-456-7890', '123 Fake Street', 21);

/* INSERT QUERY NO: 2 */
INSERT INTO table_name(`Name`, `Email`, `Phone_Number`, `Address`, `Age`)
VALUES ('Mike Jones', 'mike@example.com', '098-765-4321', '321 Fake Avenue', 45);
After conversion, you can execute these commands in your SQL server and add all data to your database.
Donate

Did you like this tool? You can donate to us. This will help us improve our free web tools.

Paypal