In this guide

FROM ROWS TO SQL

Spreadsheet to SQL guide

Convert Excel and delimited files into SQL. Review inferred types, choose a dialect, and export your rows.

XLSX / CSV / TSV → CREATE + INSERTOpen Spreadsheet to SQL

Make SQL from the rows you already have

Spreadsheet to SQL reads .xlsx, .csv, .tsv, and .txt files locally in your browser, then generates CREATE TABLE and INSERT statements for one selected worksheet.

Review inferred types and conversion issues before copying or downloading the SQL. The converter does not execute it against a database.

Import, review, then generate

  1. Upload a supported file. For an XLSX workbook, open Import settings and select the worksheet you want to convert.
  2. Open import settings. Set the SQL table name, choose a database dialect, and decide whether the first row contains column names.
  3. Review the column types and preview rows. Override any incorrect types, then save settings to apply them. Cancel discards pending settings edits.
  4. Review conversion issues, copy the SQL, or download it. Paste it into SQL to ERD to visualize the table and preview the inserted rows.

Input format & header rules

Use one record per row and one field per column. With headers enabled, the first row supplies column names; disable that setting when the first row contains data. Names are normalized into safe SQL identifiers, and duplicate column names are disambiguated.

CSV delimiter detection supports common delimited text; TSV uses tab separators. Quote CSV fields containing commas, quotes, or line breaks, and escape a quote inside a quoted field by doubling it.

The XLSX reader extracts worksheet values and date styles. Keep data tabular and review the selected worksheet preview. Legacy .xls files are not supported; save them as .xlsx or CSV first.

id,name,email
1,Ada,[email protected]
2,"Grace, Hopper",[email protected]

Type inference & dialect choices

Columns can use Auto detect or a manual Text, Boolean, Integer, Numeric, Date, or Timestamp type. The chosen dialect maps these logical types to its own SQL types and literal syntax.

Auto detect preserves leading-zero numeric text and mixed-type columns as Text, with a conversion note. Choose Text for identifiers such as postal codes or account numbers. Numeric spreadsheet cells cannot recover a display format such as 00001 from a type override; store these identifiers as text in the source.

Type inference & dialect choices
DialectIdentifiersBooleansDates / timestamps
SQLite"column"INTEGER; 1 / 0TEXT / TEXT
PostgreSQL"column"BOOLEAN; TRUE / FALSEDATE / TIMESTAMP
MySQL`column`TINYINT(1); 1 / 0DATE / DATETIME
SQL Server[column]BIT; 1 / 0DATE / DATETIME2
Changing dialect regenerates identifiers, types, and literals. Reset a column to Auto detect when you want to remove its manual override.

Values, NULL markers & spreadsheet formulas

Values, NULL markers & spreadsheet formulas
InputConversion behavior
Empty cells and missing valuesBecome SQL NULL. Fully empty data rows are omitted.
NULL-like textCase-insensitive n/a, na, null, nil, none, #n/a, #null!, and - become SQL NULL, even with a Text override. Use a different source value if the marker is meaningful text.
Boolean valuesTrue/false, yes/no, and y/n are recognized; a Boolean override can also read 1/0. Mixed columns may remain Text.
XLSX formulasReads the cached cell result; does not evaluate formulas. Recalculate and save the workbook in Excel before importing, or supply values in CSV.
Dates and timestampsXLSX date styles and supported date text inform inference. Check the preview; display formats are not preserved.
Preview rowsThe visual preview shows up to 100 rows. Generated SQL still includes all non-empty rows from the selected worksheet.
Worksheet/header changesReset per-column type overrides. Review the new column names and types before saving settings.
The XLSX reader uses the standard 1900 date-system base. Workbooks using the 1904 date system need their dates normalized to text or CSV before import.

CREATE TABLE + INSERT output

The generated script defines the selected worksheet’s columns and inserts its rows. Strings are escaped, blank values become SQL NULL, and literal formatting follows the chosen dialect.

Column definitions do not automatically add primary keys, foreign keys, or relationships. Add those constraints deliberately in the SQL editor if your data model requires them.

SQL Server output splits INSERT batches at 1,000 rows. Header-only input produces CREATE TABLE without INSERT; a completely empty file produces no SQL.

CREATE TABLE "contacts" (
    "id" INTEGER,
    "name" TEXT,
    "email" TEXT
);

INSERT INTO "contacts" ("id", "name", "email") VALUES
    (1, 'Ada', '[email protected]'),
    (2, 'Grace, Hopper', '[email protected]');
This example assumes table name contacts, headers enabled, SQLite, and Integer/Text/Text column types.

Conversion issues & file limits

An incompatible value under a selected type can become NULL in generated SQL and receives a conversion issue. Review the source value, choose an appropriate type, or correct the spreadsheet. Use the issue report to locate values needing attention.

Files are limited to 25 MB. XLSX archives are also bounded by 2,048 entries and 100 MB of uncompressed data. Convert a smaller workbook or split the source when an import exceeds these limits.

Convert worksheets individually. Browser previews and SQL generation do not create a persistent database or infer a relational schema across sheets.

Troubleshoot a spreadsheet import

Troubleshoot a spreadsheet import
SymptomWhat to check
Wrong column names or a missing first recordReview First row contains column names and the selected worksheet in Import settings.
An identifier lost its leading zerosStore it as text in the workbook. Numeric display formatting is not an identifier value.
A value becomes NULL unexpectedlyCheck conversion issues and the NULL-like markers above. Type overrides do not preserve NULL markers as text.
Only 100 rows appearThat is the preview limit; Copy SQL and Download include all non-empty source rows.
Formula output is blank or out of dateRecalculate and save the workbook so cached results are available, or export the calculated values as CSV.
Type overrides disappearedChanging the worksheet or header choice resets overrides. Reapply the intended types before Save settings.
Copy SQL failsCheck browser clipboard permissions or use Download to obtain the generated .sql file.

Ask AI to review data and SQL

Copy this guide as an AI prompt, then provide your target dialect, worksheet, header choice, table name, and type overrides. Include a small representative sample and the conversion issues you need help with.

Ask for schema constraints as a separate design decision. Review the generated SQL before running it in your own database or adding it to SQL to ERD.

Review my spreadsheet conversion for SQLite.
Worksheet: Contacts. First row is headers. Table name: contacts.
Keep account_code as Text to preserve leading zeros.
Explain any values that become NULL and suggest type corrections.
Ask before adding primary keys or relationships.