CSV to SQL Insert Generator
Convert CSV to SQL INSERT statements free in your browser. Generates CREATE TABLE and INSERT queries from any CSV — no upload.
- 100% free
- Runs in your browser — nothing is uploaded
- No signup required
Seeding a database from a spreadsheet shouldn't require writing a loader script. Paste your CSV, name the table, and get a ready-to-run CREATE TABLE plus a single batched INSERT statement.
Values are properly escaped (single quotes doubled), numeric values are left unquoted, and empty cells become NULL. Works with PostgreSQL, MySQL, SQLite, and SQL Server with little or no editing.
Example
name,age Ada,36
INSERT INTO my_table ("name", "age") VALUES
('Ada', 36);Your data never leaves your device
Like everything at OpenCSV, this tool processes files locally in your browser. There is no upload, no server-side processing, and no copy of your data anywhere — which makes it safe for customer lists, financial exports, and other sensitive files.
Frequently Asked Questions
- The generated SQL is standard enough for PostgreSQL, MySQL, SQLite, and SQL Server. Column types default to TEXT — adjust them in the CREATE TABLE if needed.
Keep working with your CSV
- / free toolCSV to JSON
Turn CSV rows into a JSON array of objects.
- / free toolJSON to CSV
Flatten a JSON array into spreadsheet-ready CSV.
- / free toolCSV to Excel
Turn a CSV into a real .xlsx Excel workbook.
- / free toolExcel to CSV
Extract clean CSV from any .xlsx or .xls workbook.
- / hubAll free CSV tools
Converters, splitter, merger, validator and more.
Need to view or edit the file first?
OpenCSV is the fastest CSV editor on the web — open, fix, and save any CSV in seconds. $1 lifetime access.
Try OpenCSV free