From Spreadsheet to Database in One Paste
You’ve got 150 rows of product data in a Google Sheet. Your dev database needs INSERT statements. Writing them by hand is mind-numbing and error-prone — one missing quote and your import blows up on row 73.
Paste the CSV, pick MySQL, PostgreSQL or SQLite, set your table name, and get properly formatted SQL with types auto-detected per column. Numbers stay bare only when the whole column is numeric, so a zip code like 007, a phone number like +1555... or a 0x1F keeps its exact text. Strings get quoted and escaped the way your database expects (backslashes included for MySQL), table and column names are quoted so order or first name can’t break the statement, and only empty cells become NULL: a cell that literally says null stays the text ‘null’. You can get a single INSERT with multiple VALUES (more efficient) or separate INSERT statements per row (more compatible across database engines).
Toggle on the CREATE TABLE option and you get the schema too: INTEGER or BIGINT for whole numbers (by range), DECIMAL sized to your longest value for decimals (REAL in SQLite when every value fits one exactly), and text columns for everything else. Copy the whole block, run it in your database client, done.
A Practical Walkthrough
Your CSV looks like this:
name,age,city
John,30,New York
Jane,25,London
The output:
INSERT INTO `users` (`name`, `age`, `city`) VALUES
('John', 30, 'New York'),
('Jane', 25, 'London');
Notice age values aren’t quoted — the tool saw integers and kept them as integers. name and city are strings, so they’re wrapped in single quotes with special characters escaped.
When You’ll Reach for This
Seeding a dev database. Your QA team maintains test scenarios in a spreadsheet. Export the sheet, paste it here, run the SQL against your local MySQL or PostgreSQL instance. Five minutes, not fifty.
Migrating between systems. Exporting from one database as CSV and importing into another as SQL is one of the most common migration patterns. Especially useful when going from SQLite to PostgreSQL or MySQL to MariaDB.
Quick prototyping. You’re spinning up a new project and need some data to work with. Grab a public CSV dataset, convert it to INSERT statements, and populate your schema.
Generating test data. Use the Fake Data Generator on Toolsvu to create realistic CSV data, then convert it to SQL here. Two tools, full test database.
A few things to watch: MySQL limits the size of a single INSERT statement (default max_allowed_packet is 64MB). PostgreSQL handles very large INSERTs fine, but older versions of SQLite choke on more than 500 VALUES in one statement. When in doubt, use the “separate INSERT statements” option.
Run your CSV through the CSV Validator first to catch column count mismatches and quoting issues. Bad CSV makes bad SQL. The SQL to CSV tool handles the reverse direction.
All conversion runs in your browser. Your data doesn’t leave the page.