What this converter does
It turns a spreadsheet export into a SQL script you can run straight away: a CREATE TABLE statement with a sensible type for every column, followed by INSERT statements that load every row. It is the quickest way to get a CSV from a client, a Kaggle dataset or an Excel sheet into MySQL, PostgreSQL, SQL Server or SQLite so you can start writing queries.
The parser follows RFC 4180, the closest thing CSV has to a standard: values in double quotes may
contain the delimiter, line breaks and quotes written twice (""). The delimiter (comma,
tab, semicolon or pipe) and the header row are detected, and you can override both.
How the column types are chosen
Every non-empty value in a column is checked, not just the first few rows. The first rule that fits all of them wins.
| Values in the column | Type | Example |
|---|---|---|
| true / false, yes / no, t / f, y / n | BOOLEAN | yes |
| Whole numbers up to 2,147,483,647 | INT | 1001 |
| Larger whole numbers | BIGINT | 9876543210123 |
| Numbers with decimals | DECIMAL(p,s) | 1,24,999.50 |
| Numbers in scientific notation | DOUBLE | 1.5e-7 |
| Dates | DATE | 02/10/2026 |
| Dates with a time | DATETIME | 2026-10-04 18:30 |
| Anything else, up to 4,000 characters | VARCHAR(n) | Mumbai |
| Longer text | TEXT | a product review |
In DECIMAL(p,s), s is the most digits after the decimal point and p is s plus the most digits before it, so 1,24,999.50 needs DECIMAL(8,2). A value with a leading zero such as a PIN code or 007 keeps the whole column as text, because a number type would drop the zero.
Worked example: UPI orders from an online store
Press Load example. The file has eight orders with the kind of mess real exports
contain: amounts written the Indian way inside quotes ("1,24,999.50"), dates as
DD/MM/YYYY, delivery times missing for orders still in transit, a note with a comma, a note that runs
over two lines, a doubled quote, a Windows folder path with backslashes, and a review in Hindi.
- order_id becomes INT and the primary key, because it is named like an ID and every value is unique.
- amount_inr becomes DECIMAL(8,2), and 1,24,999.50 is written as 124999.50.
- paid_upi (yes / no) becomes BOOLEAN: TRUE and FALSE in MySQL and PostgreSQL, 1 and 0 in SQL Server and SQLite.
- order_date becomes DATE, with 02/10/2026 rewritten as 2026-10-02. delivered_at becomes DATETIME, with NULL for the two undelivered orders.
- pincode stays an INT here because no PIN starts with 0, but switch it to VARCHAR in the Columns tab if you prefer codes as text.
Switch the Database menu to compare the four dialects; the Columns tab shows the exact type each one gets.
Dialect differences at a glance
| MySQL | PostgreSQL | SQL Server | SQLite | |
|---|---|---|---|---|
| Quoted name | `city` | "city" | [city] | "city" |
| Boolean | BOOLEAN, TRUE | BOOLEAN, TRUE | BIT, 1 | INTEGER, 1 |
| Text | VARCHAR(n) | VARCHAR(n) | NVARCHAR(n), N'...' | TEXT |
| Date and time | DATETIME | TIMESTAMP | DATETIME2 | TEXT (ISO) |
| Backslash in a string | Doubled | As is | As is | As is |
| Create only if missing | IF NOT EXISTS | IF NOT EXISTS | IF OBJECT_ID(...) IS NULL | IF NOT EXISTS |
Doing the same in Python
If you already work in pandas, this is the equivalent for SQLite. It is handy for scripts, but you lose control over the column types unless you pass dtype yourself.
import pandas as pd, sqlite3
df = pd.read_csv("upi_orders.csv", thousands=",", dayfirst=True,
parse_dates=["order_date", "delivered_at"])
with sqlite3.connect("shop.db") as con:
df.to_sql("upi_orders", con, if_exists="replace", index=False)
print(con.execute("SELECT COUNT(*) FROM upi_orders").fetchone())
Common mistakes
- Saving from Excel with long IDs. Excel shows 16 digit numbers as 1.23457E+15 and stores them rounded. Format the column as text before you export.
- Mixing DD/MM and MM/DD. 03/04/2026 is 3 April in India and 4 March in the US. Check the Date order note before you load.
- Unquoted commas. A value such as
Gift wrap, no invoicemust be in double quotes in a comma separated file, otherwise the row gains a column. The converter names the row so you can fix it. - Loading backslashes into MySQL by hand. MySQL reads
\ninside a string as a line break, so a path likeC:\newchanges. The MySQL output here doubles every backslash. - Keeping VARCHAR(255) everywhere. Right-sized columns document the data and catch bad rows. Use the Text column size option to choose exact or rounded lengths.