Select cells in your spreadsheet, press Ctrl+C, paste here, and get SQL INSERT statements instantly. Auto-detects column types.
DROP TABLE IF EXISTS "my_table";
CREATE TABLE "my_table" (
"id" INTEGER,
"name" TEXT,
"email" TEXT,
"age" INTEGER,
"country" TEXT,
"active" BOOLEAN
);
INSERT INTO "my_table" ("id", "name", "email", "age", "country", "active")
VALUES
(1, 'Alice Johnson', '[email protected]', 28, 'USA', TRUE),
(2, 'Bob Smith', '[email protected]', 34, 'UK', FALSE),
(3, 'Charlie Brown', '[email protected]', 22, 'Canada', TRUE),
(4, 'Diana Prince', '[email protected]', 31, 'Australia', TRUE);idINTEGER | nameTEXT | emailTEXT | ageINTEGER | countryTEXT | activeBOOLEAN |
|---|---|---|---|---|---|
| 1 | Alice Johnson | [email protected] | 28 | USA | true |
| 2 | Bob Smith | [email protected] | 34 | UK | false |
| 3 | Charlie Brown | [email protected] | 22 | Canada | true |
| 4 | Diana Prince | [email protected] | 31 | Australia | true |
When you copy cells in Microsoft Excel or Google Sheets, the clipboard contains tab-separated values (TSV) — one row per line, columns separated by tabs. This tool parses that format directly, so there is no need to export a CSV file first.
.sql file.The tool scans every value in each column and applies the most specific SQL type that fits all non-empty cells:
| Detected pattern | SQL type | Example values |
|---|---|---|
| All whole numbers | INTEGER | 1, 42, -7 |
| All decimal numbers | REAL | 3.14, 0.5, -1.2 |
| true / false / yes / no / 1 / 0 | BOOLEAN | true, FALSE, yes, 0 |
| Anything else | TEXT | Alice, 2024-01-15, N/A |
Empty cells are always emitted as NULL regardless of column type.
For efficiency, INSERT statements use multi-row VALUES syntax with up to 100 rows per statement. This is significantly faster than one INSERT per row, especially in PostgreSQL and MySQL.
INSERT INTO "users" ("id", "name", "email")
VALUES
(1, 'Alice Johnson', '[email protected]'),
(2, 'Bob Smith', '[email protected]'),
(3, 'Charlie Brown', '[email protected]');Single quotes inside text values are automatically escaped by doubling them (O'Brien → 'O''Brien'), following the ANSI SQL standard supported by PostgreSQL, MySQL, and SQLite.
CAST(created_at AS DATE).After downloading the .sql file, import it with your database client:
-- PostgreSQL
psql -U postgres -d mydb -f users.sql
-- MySQL
mysql -u root -p mydb < users.sql
-- SQLite
sqlite3 mydb.db < users.sqlSpreadsheet imports are usually messy at the edges. The goal here is to get a reliable first SQL script quickly, then refine the model once the data is safely inside a database.
Fastest path when product, ops, or marketing hands you a sheet and you just need rows in SQL.
Useful for demos, QA fixtures, and ad hoc imports that should still be reproducible.
Most spreadsheet-to-SQL problems are not parser bugs. They come from inconsistent headers, human formatting, and dirty columns. These are the checks worth making before you run the script.
If the first row contains labels like "Customer Name" or "Order Total ($)", those exact values become quoted SQL identifiers. Clean headers first if you want simpler schema names.
Excel and Google Sheets often paste formatted dates as strings. The tool keeps them safe as TEXT; cast them later if your target schema expects DATE or TIMESTAMP.
Use the preview table to spot columns that were inferred as TEXT because of a stray value like N/A, -, or a formatted currency string.
A paste-to-SQL tool gets the rows into the database quickly. These paths connect that first import to the modeling or cleanup work that usually follows.
Use this path when copied cells need trimming, casting, and stronger type decisions after the initial SQL script is generated.
Relevant when a copied worksheet is acting as an informal data model and needs to be reshaped into tables and relationships.
Choose this route when the spreadsheet is being turned into reusable fixtures rather than a one-time manual load.
These guides help when the spreadsheet is only the first step and the real work is cleaning, typing, and modeling the data after import.
Best follow-up when pasted spreadsheet data needs trimming, casting, or deduplication after import.
Helpful when the inferred INTEGER, REAL, BOOLEAN, and TEXT types need to be tightened for a real schema.
Useful when spreadsheet imports are part of a broader fixture or seeding workflow.
Helpful when a spreadsheet import is the first draft of a table design rather than the final schema you want to keep.