Skip to content

Converting

The web converter

Convert Excel, ODS, CSV and JSON into SQL in your browser at intosql.com - every option, the column editor, the report, size limits and privacy.

View as Markdown

The converter on intosql.com turns a spreadsheet, CSV or JSON file into a SQL script, a clean CSV or JSON, without an account. The engine runs inside your browser as WebAssembly, so the file is read on your computer and never uploaded.

Open a file

The converter opens on a sample workbook, already converted, so you can see the preview, the SQL and the report before you pick anything. While the sample is on screen, Other samples switches between an Excel workbook, a CSV export and a JSON array.

To convert your own file, select Choose your file, or drop the file anywhere on the page. Once your file is open, the button reads Choose another file, and dropping another file replaces it.

Supported files

Kind Extensions
Spreadsheets .xlsx, .xlsm, .xls, .xlsb, .ods
Delimited text .csv, .tsv, .txt
JSON .json (an array of objects or arrays, or an object that holds one, such as {"data": [...]}), .ndjson (one record per line)
Database dumps .sql, .sql.gz from MySQL or MariaDB, converted to PostgreSQL: see MySQL to PostgreSQL

The file picker offers these extensions, but the engine reads the content to decide the format. A password-protected, damaged or empty file stops with a message that says what is wrong and what to try.

A new file starts from the default options. The database and the output format you picked stay as they are.

Choose the database

Pick the target under Your database: PostgreSQL, MySQL, MariaDB, SQLite, SQL Server or Oracle. The output is written again for that database right away, with its own types, quoting and statements. Column types lists what each kind of value becomes in each one.

Choose the output

Output sets what you download:

Output What you get Download name
SQL script CREATE TABLE and INSERT statements for the database you picked ventas.postgresql.sql
Clean CSV The fixed data as UTF-8 CSV, with the column names the SQL would use ventas.csv
JSON The fixed data as JSON ventas.json

The file name comes from the table name. For CSV and JSON, the database still decides the column names and how values are written.

A ready SQLite database

When the database is SQLite and the output is a SQL script, a second button builds a database file you can open directly: Download ventas.sqlite. The browser runs the script in a separate worker and hands you the file.

This works for scripts up to 256 MB, since building it holds the script and the database in memory at once. For a larger file, download the script and run it with sqlite3, or use intosql load on the command line.

Options

The common options sit in the toolbar above the preview. More options shows the rest. On a phone, they are all behind Options.

Changing any option converts the file again. Sheet, header row, separator and encoding change how the file is read, so they also read the preview again and clear any column changes you made.

Option Default What it changes
Sheet The first visible sheet Which sheet of a workbook to convert. It appears only when the workbook has more than one visible sheet. Changing it detects the header row again.
Header row Detect The row that holds the column names, counted from 1. Rows above it are left out. Leave it empty to detect it; type a number and press Enter or leave the field to apply it.
Dates Detect How to read dates like 03/02/2024: Detect decides from the column's own values (a 15/02/2024 in the column proves day-first), Day first reads it as February 3, Month first as March 2.
Table name Made from the file's name The table's name in the SQL. The field shows the name in use; type another and leave the field to apply it. Clear it to go back.
Separator Detect For CSV and TSV files: comma, semicolon, tab or vertical bar.
Encoding Detect For CSV and TSV files: utf-8, windows-1252, iso-8859-1, utf-16le, utf-16be, shift_jis, gbk or windows-1251. The default shows what was detected, such as Detect (windows-1252).
Keep column names as written Off Off, names become snake_case that every database reads without quotes: Nº Cliente becomes no_cliente. On, names stay as the header writes them, quoted.
Start with the CREATE TABLE statement On Turn it off to get only the INSERT statements, for a table that already exists.

Note: Separator and encoding appear only for CSV and TSV files. Spreadsheets and JSON carry their own structure and encoding.

Change a column

Select a column's header in the preview to open its editor. The title shows the column's position and header, with the type it was detected as, such as Detected as date.

  • Name in the SQL renames the column. Leave it empty to keep the name IntoSQL made.
  • Keep as text stores every value exactly as written in the file, with no type inference. It appears for columns detected as something other than text. Use it for codes that look like numbers or dates.
  • Leave this column out drops the column from the output. At least one column has to stay.

Select Apply to convert again. The column's header in the preview shows Text or Left out while the change is in effect. To undo a change, open the editor again and clear it.

Read the report

The summary line

Above the output, one line counts what happened:

Text
5 rows converted, 8 fixes, none rejected in 0.04 s

The time runs from picking the file, or the change, to the finished output.

Fixes

Every change IntoSQL made is listed under Fixes, numbered. The same number marks the column or cell it applies to in the preview, so you can see each fix in place. Point at a fix in the list to highlight its mark. Typical fixes:

  • The header is on row 4; the rows above it were left out.
  • Row 10 ("TOTAL") is a total, so it was left out.
  • Leading zeros kept in "Folio": 00412 stays 00412, stored as text.
  • 15/02/2024 proves the dates in "Fecha" are day-first, so 03/02/2024 is read as 2024-02-03.

When the file needed nothing, the list reads Nothing needed fixing. How fixes work explains each one.

Needs a look

Needs a look lists problems that did not stop the conversion but may change what you load: a value that could be read two ways, a second table on the sheet that was skipped, rows with a different number of fields. Each one says where it is and what to do.

Rejected rows

A row that can't be converted, such as 31/02/2024 in a date column, is rejected and left out of the output. The summary counts them, and See the rejected rows lists each one with its row, column and reason. When there are many, the first ones are listed.

To bring a rejected row back, fix the value in the file, or open the column's editor and select Keep as text. Errors lists every reason a row can be rejected.

On a phone

On narrow screens the preview, the output and the report are separate views. Switch between them with Your file, SQL and the fixes count at the top.

Copy or download

  • Download saves the whole output, named after the table, as in ventas.postgresql.sql.
  • Copy puts the whole output on the clipboard. It is available for outputs up to 10 MB; for larger ones, download instead.

The output pane shows the first 48 KB of the output. Below it, a line says how much is shown out of the total. The download and the copy always hold all of it.

File size in the browser

Before reading a file, the converter checks whether this browser can take it, so a file that is too big never freezes the tab halfway.

  • Spreadsheets and .json files are read whole, so their limit is memory. The converter uses at most half of the device's memory, and never more than 2 GB. An .xlsx or .xlsm file needs about twice its size; .xls, .xlsb, .ods and .json need about four times. On most computers that allows .xlsx files up to about 1 GB and the others up to about 512 MB.
  • CSV, TSV, TXT and NDJSON files are streamed, so memory is not the limit. The browser needs free storage for this site of about two and a half times the file's size, for a copy of the file and the output. Files of several gigabytes work.

When a file is too big, the converter says why, with the limit for this device, and shows the command that converts it on your computer instead, filled in for your file and database:

Terminal
intosql convert ventas.xlsx --to postgresql -o ventas.sql

The command line and the desktop app take files of any size.

While a file converts, a progress bar shows each step: checking the file, reading it and writing the output. Cancel stops the work and goes back to the sample.

Privacy and offline use

The engine runs in your browser as WebAssembly. Your file is read on your computer, converted there and saved from there; it is never uploaded, and IntoSQL never sees its name, tables, columns or values.

The site counts conversions with cookie-free analytics. An event carries only coarse facts, such as the input format, the database and a size range.

After your first visit, the converter works without a connection. The site keeps the files it needs in your browser, so you can open intosql.com offline and convert.

Keyboard and screen readers

  • Every control is reachable with the keyboard. Each column header in the preview is a button that opens the column's editor.
  • The preview, the output pane and the rejected rows list are scrollable regions you can focus and scroll with the arrow keys.
  • The summary line is announced when a conversion finishes, and errors are announced as alerts.

Troubleshooting

The header is on the wrong row. Type the right row number in Header row and press Enter.

Dates came out with day and month swapped. Set Dates to Day first or Month first.

Accents show as odd characters. Open More options and pick the file's encoding. Exports from older Windows programs are often windows-1252.

A column of codes lost its leading zeros or became a number. Open the column's editor and select Keep as text.

The table already exists. Turn off Start with the CREATE TABLE statement and set Table name to the existing table.