CREATE TABLE and INSERT statements from CSV for MySQL, PostgreSQL, SQLite or SQL Server. Runs entirely in your browser — nothing is uploaded.
6 answers to what people ask most about the CSV to SQL.
Paste the CSV or open the file, pick your database and table name, and the tool writes one INSERT per batch of rows. Turn on CREATE TABLE to get the table definition too.
Each column gets the narrowest type that fits every value: INT or BIGINT for whole numbers, DECIMAL for decimals, BOOLEAN for true and false, DATE or TIMESTAMP for ISO dates, and text otherwise. Turn off Detect column types to make every column text.
Values with leading zeros, such as ZIP codes like 02134, and numbers longer than 15 digits are kept as quoted text so nothing is lost or rounded.
Single quotes are doubled, which every database accepts. For MySQL, backslashes are doubled too, and SQL Server strings with non-English characters get the N prefix.
MySQL, PostgreSQL and SQLite accept large multi-row INSERTs. SQL Server allows at most 1,000 rows per VALUES list, so batches are capped there.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so your files are processed on your device and never uploaded. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue