CSV to SQL Insert
Convert CSV to SQL INSERT statements for PostgreSQL, MySQL or SQL Server, with an inferred CREATE TABLE and batches. Free and private.
More options
CSV
Stays in your browserSQL
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to SQL Formatter.
Free Online CSV to SQL Insert
Turn spreadsheet rows into SQL you can run. Choose your database, name the table, and the tool writes a CREATE TABLE with guessed column types and INSERT statements in batches. It gives developers a quick browser-based way to solve a focused csv to sql insert task before moving the result into a project.
How to use CSV to SQL Insert
Paste your data into the box on the left, or open a file, then press Convert. The first row gives the column names. Types are guessed from the data: whole numbers, decimals, true/false, dates and text.
Common mistakes
- Running the generated SQL without reading the guessed types: check the CREATE TABLE before using it on a real database.
- Phone numbers and codes with leading zeros are detected as text only when a value is not a plain integer; review them.