CSV to SQL INSERT converter
Paste CSV (or cells copied from Excel or Google Sheets, with the header row) and pick your database. Column types are inferred from every value: whole numbers become INTEGER, decimals a floating type, everything else text, and ids with leading zeros stay text. Output was executed in SQLite and PostgreSQL 17 on 2026-10-01, including a 249-row, 56-column file, and read back identical to the CSV. Nothing is uploaded.
Frequently asked questions
How are quotes and special characters handled?
Single quotes are doubled (O'Brien becomes 'O''Brien'). For MySQL, backslashes are doubled too, because MySQL treats a backslash as an escape by default. Identifiers are quoted (double quotes, or backticks for MySQL), so column names with spaces or reserved words work.
What happens to empty cells?
They become NULL. The text NULL in a cell stays the string 'NULL'.
Why is my zip code column TEXT?
Values with leading zeros (02134) are kept as text so the zeros are not lost. A column is numeric only when every non-empty value is a plain number.
How big can the file be?
Rows are grouped into INSERT statements of up to 500 rows (adjustable). Very large files are better loaded with your database's import command: COPY (PostgreSQL), LOAD DATA (MySQL) or .import (SQLite).
Is my data sent to a server?
No. The page has no analytics and makes no network requests with your input.