Convert tabular CSV files and spreadsheets into bulk SQL INSERT statements for PostgreSQL, MySQL, and SQLite.
Your data is computed entirely inside your browser's JavaScript engine and is never transmitted across the network.
1CREATE TABLE IF NOT EXISTS "users" (2 "sku" VARCHAR(64),3 "title" VARCHAR(64),4 "category" VARCHAR(64),5 "price_pkr" INTEGER,6 "stock_qty" INTEGER,7 "is_featured" BOOLEAN8);910INSERT INTO11 "users" (12 "sku",13 "title",14 "category",15 "price_pkr",16 "stock_qty",17 "is_featured"18 )19VALUES20 (21 'LAP-001',22 'MacBook Pro M3 Max',23 'Electronics',24 850000,25 12,26 TRUE27 ),28 (29 'PHN-002',30 'Samsung Galaxy S26 Ultra',31 'Mobile Phones',32 420000,33 25,34 TRUE35 ),36 (37 'ACC-003',38 'Sony WH-1000XM5 Headphones',39 'Audio',40 95000,41 40,42 FALSE43 ),44 (45 'WCH-004',46 'Apple Watch Series 11',47 'Wearables',48 135000,49 18,50 TRUE51 ),52 (53 'TAB-005',54 'iPad Pro 13-inch OLED',55 'Tablets',56 360000,57 15,58 FALSE59 );Follow these 3 simple steps to complete your conversion in seconds.
Paste your CSV to SQL INSERT code directly into the left editor pane or click Upload to select a file.
Adjust indentation (2 or 4 spaces), toggle alphabetical key sorting, set SQL table name and dialect quotes, or pick a built-in template.
View formatted output in real time with line numbers and syntax highlighting. Click Copy or Download to save.
Formula representation used for accurate calculations:
Quick reference lookup table for standard unit calculations.
| Feature / Construct | PostgreSQL / SQLite | MySQL / MariaDB |
|---|---|---|
| Identifier Quoting | "table_name", "column" | `table_name`, `column` |
| String Escaping | 'O''Reilly' | 'O''Reilly' or 'O\'Reilly' |
| Boolean Values | TRUE / FALSE | TRUE / FALSE (TINYINT 1/0) |
| JSON Objects | '{"a": 1}'::jsonb | '{"a": 1}' |
| Null Handling | NULL | NULL |
Common questions and answers about CSV to SQL INSERT Converter.