What it does
Moving a spreadsheet into a database usually means writing a CREATE TABLE and a long list of INSERT lines by hand. This tool does both. It reads your CSV (or tab-separated text), guesses a type for each column, and writes the SQL for SQLite, PostgreSQL, MySQL or MariaDB, or SQL Server, with the right quotes around names and the right type names for that database.
The file is read on your device and nothing is uploaded. Before you load data, look at it with CSV profiler; to try the SQL straight away, paste it into SQL playground; and to tidy the result, use SQL formatter.
How to use it
- Paste your CSV, or choose a file. A small example is already loaded.
- Pick the database, type the table name and say whether the first row is a header.
- Check the Columns found table. If a type looks wrong, the data probably has a stray value in that column.
- Press Copy SQL or Download .sql.
What each option does
- Cells are separated by: the tool guesses comma, tab, semicolon or bar. Change it if the columns look wrong.
- Rows per INSERT: how many rows go into one INSERT. Bigger batches load faster. SQL Server allows at most 1,000.
- Write CREATE TABLE and Add DROP TABLE IF EXISTS: the second is handy for repeat runs, but it deletes an existing table of that name when you run it.
- Empty cells become NULL: untick it to keep empty text as an empty string.
- Lower-case column names: names are also cleaned so spaces and symbols become underscores.
Worked example
The example has three rows and the columns id, name, price, joined and active. For PostgreSQL the types are INTEGER, TEXT, DOUBLE PRECISION, DATE and BOOLEAN. The apostrophe in O’Neil is written as 'O''Neil', and all three rows go into one INSERT (3 rows, 1 statement, 318 characters of SQL). With 2 rows per INSERT there would be 2 statements.
FAQs
How are types guessed? Every value in a column is checked. All whole numbers give INTEGER (BIGINT if large), decimals give a decimal type, true or false give a boolean, ISO dates (2026-03-01) give a date, and anything else is text. A number with a leading zero, like 00123, stays text so the zero is not lost.
Is money stored correctly? Decimals are written as floating-point numbers, which can round in the last digits. For money, change the type to DECIMAL(12,2) yourself.
What about quotes and special characters? Apostrophes are doubled, and for MySQL backslashes are escaped. Text with accents is written as N’…’ for SQL Server.
Does it run the SQL? No. It only writes it. Run it in your own database, or in SQL playground.
Where the numbers come from
- fibub's own CSV reader (quoted cells, doubled quotes, line breaks inside quotes, byte-order mark) and writer. Type names follow each database's documentation: SQLite type affinity, PostgreSQL data types, MySQL and SQL Server data types (checked 2026-12-05). SQL Server allows up to 1,000 rows in one VALUES list. The guessed types are a starting point, so check them before running the SQL.
Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.
Read more on the Blog
Last updated 2026-12-05.