Skip to content
IntoSQL home

Convert Excel, CSV, JSON and database dumps to SQL

Turn a spreadsheet, CSV or JSON file into a table with the right types. Or convert a whole database into a script for another one, with its keys, indexes and rows.

  • Converted on your computer
  • No account needed
  • Every change reported
Your file
xlsxclientes_2024.xlsxSample file, 7 kB
Your database

4 rows converted, 10 fixes, none rejected

Show
The first rows of clientes_2024.xlsx, with each fix marked
Row
500127Peña Muñoz0123403/02/2024sí1.234,50
600128José Ángel0987015/02/2024noN/A
700129Zoë Ortíz4410029/02/2024sí-12,00
800130Ñuño Castañeda0670011/03/2024no980,75
-- Written by IntoSQL for PostgreSQL.

SET client_encoding = 'UTF8';
BEGIN;

CREATE TABLE clientes_2024 (
    no_cliente text NOT NULL,
    nombre text NOT NULL,
    c_p text NOT NULL,
    alta date NOT NULL,
    activo boolean NOT NULL,
    saldo numeric(6,2)
);
COMMENT ON COLUMN clientes_2024.no_cliente IS 'Nº Cliente';
COMMENT ON COLUMN clientes_2024.c_p IS 'C.P.';

INSERT INTO clientes_2024 (no_cliente, nombre, c_p, alta, activo, saldo) VALUES
('00127', 'Peña Muñoz', '01234', '2024-02-03', TRUE, 1234.50),
('00128', 'José Ángel', '09870', '2024-02-15', FALSE, NULL),
('00129', 'Zoë Ortíz', '44100', '2024-02-29', TRUE, -12.00),
('00130', 'Ñuño Castañeda', '06700', '2024-03-11', FALSE, 980.75);

COMMIT;

Fixes

  1. The header is on row 4; the rows above it were left out.
  2. Row 9 ("TOTAL") is a total, so it was left out.
  3. Column "Nº Cliente" is named no_cliente so PostgreSQL reads it without quotes.
  4. Column "C.P." is named c_p so PostgreSQL reads it without quotes.
  5. Leading zeros kept in "Nº Cliente": 00127 stays 00127, stored as text.
  6. Leading zeros kept in "C.P.": 01234 stays 01234, stored as text.
  7. 15/02/2024 proves the dates in "Alta" are day-first, so 03/02/2024 is read as 2024‑02‑03.
  8. "Activo" holds yes and no words (sí, no), stored as boolean.
  9. Numbers in "Saldo" use a decimal comma: 1.234,50 is read as 1234.50.
  10. N/A in "Saldo" read as empty (1 of 4 values).

Your file is converted on this computer and never uploaded.

Other samples:

Convert a file, or a whole database

Five things that break file imports, and how IntoSQL handles them

Spreadsheets and exports carry habits that databases don't share. These five break imports most often. IntoSQL handles each one and lists it in the report, with the row and column it touched.

In the fileImported as isConverted by IntoSQL
ZIP code 01234Imported as is: Read as the number 1234Converted by IntoSQL: Kept as 01234, stored as text
A CSV saved by Excel on WindowsImported as is: Peña arrives as Peña, or the import stopsConverted by IntoSQL: Encoding detected, accents intact
Header on row 4, under a titleImported as is: The title becomes the column namesConverted by IntoSQL: Header found, the rows above it left out
Decimal comma: 1.234,50Imported as is: Stored as text, or as 1.234Converted by IntoSQL: Read as 1234.50
03/02/2024 in a day-first fileImported as is: Read as March 2Converted by IntoSQL: February 3, because 15/02/2024 is in the same column
Every fix the converter makes

What a database conversion keeps and reports

The converter reads the dump file itself, without a database server, and writes one script for the target database.

Kept in the script

  • Tables and columns, each with the closest type the target has
  • Primary, unique and foreign keys, indexes, defaults and identity columns
  • Every row, with counters continuing where the dump left them

Listed in the report

  • Values the target can't hold, such as a 0000-00-00 date in PostgreSQL
  • Types the target doesn't have, such as ENUM, with the type each one became
  • Views, triggers and procedures, by name, since each database writes them in its own language
How database migration works

Every conversion, with its own page

Rows are what you have, a file or a database dump; columns are the database it goes to. Each dot opens a converter with its own page: the script it writes, how to load it and how every type maps.

How long a conversion takes

IntoSQL and the tools people usually reach for, loading the same files on one laptop: 1,000,000 rows and 14 columns with accents, decimal commas and day-first dates in them.

Excel, 117 MB to PostgreSQL

3.9×faster than DuckDB

DuckDB reads the workbook with its excel extension and writes it through its postgres extension.

ToolLoadsTime
IntoSQL2.9 s
DuckDB11.2 s

CSV, 174 MB to PostgreSQL

As fast as psql \copy

psql \copy loads every column as text into a table made by hand. IntoSQL makes the table with each column's type and checks every value on the way.

ToolLoadsTime
IntoSQL2.4 s
psql \copy2.6 s
DuckDB5.2 s

CSV, 174 MB to SQLite

1.5×faster than sqlite3 .import

sqlite3 .import stores every value as text. IntoSQL gives each column its type.

ToolLoadsTime
IntoSQL2.1 s
sqlite3 .import3.2 s

Writing the script without loading it takes 0.7 s for the CSV and 1.0 s for the workbook.

Median of 3 runs on an Apple M4 MacBook Air, 10 cores, 24 GB, October 16, 2026, with IntoSQL 0.1.0, PostgreSQL 18.0, DuckDB 1.5.6, SQLite 3.51, each on an empty database on the same machine. In the browser the same engine runs as WebAssembly: a little slower, and spreadsheets are limited by the memory the browser allows.

Database dumps, measured against pgloader

  • A 5.3 GB dump of 30 million rows: pgloader needs it restored into a running MySQL first, which takes 18 minutes, then runs out of memory with its defaults. IntoSQL converts the dump in 10 seconds, and psql loads the script in about 3 minutes.
  • Across 476 dumps from MySQL 5.5 to 9 and MariaDB 10.3 to 12, loaded into PostgreSQL 13 and 18: no load errors, and no value changed without a line in the report.

The same dumps, converted and loaded by IntoSQL and by pgloader 3.6.7 on one machine (a 10-core i9-10900K with a SATA SSD), in October 2026.

The MySQL to PostgreSQL page

Your file stays on your computer

The converter on this page is IntoSQL's engine compiled to WebAssembly. It runs inside this browser tab: the file is read, checked and converted there, and its content is never sent anywhere.

  • It works offline

    Once this page has loaded, turn off your connection and convert a file. It still works.

  • Nothing is sent

    Open your browser's network panel while a file converts: no request carries any of its content.

  • No file names in analytics

    We count conversions by format and database. The names, columns and values in your files are never recorded.

  • When a server does the work

    The API and AI assistants convert on IntoSQL's servers. Those files are deleted 24 hours after the conversion ends.

This browser tab

xlsxclientes.xlsxYour fileIntoSQL engine, WebAssemblysqlclientes.postgresql.sqlYour SQL
intosql.comReceives nothing

The same engine in five places

The converter on this page, the desktop app, the command line, the API and the MCP server run the same engine. A file converts the same way in each, with the same report.

Command line

One program for macOS, Linux and Windows, for scripts and scheduled jobs. Converting and loading into SQLite are free; loading into PostgreSQL, MySQL or MariaDB is part of Pro.

Command line guide
zsh - ~/exports
$ brew install alfonsobries/intosql/intosql$ intosql convert clientes_2024.xlsx --to postgresql --output clientes.sqlclientes_2024   4 rows   10 fixes   0 rejected

Free and Pro

Free

$0

The converter on this page, with no account and no limit on how many files.

  • Excel, CSV, JSON and MySQL, MariaDB, PostgreSQL, SQL Server, SQLite and Oracle dumps to six databases
  • Every fix listed in the report
  • A ready SQLite database to download
  • The command line, to convert files and load SQLite

IntoSQL Pro

$12 a monthor $96 a year

For files you load often, or from code.

  • Loading and saved jobs in the desktop app
  • Loading straight into PostgreSQL, MySQL and MariaDB
  • The API, with webhooks
  • AI assistants through the MCP server

Questions about converting files and databases to SQL

Not answered here? Write to us from the contact page and a person replies. Contact page

Is my file uploaded?

No. The converter runs in your browser with WebAssembly, so the file never leaves your computer.

Is it free?

Converting is free in the browser, the command line and the desktop app. Pro adds loading into database servers, saved jobs, the API and the hosted MCP server.

Do I need an account?

Only for IntoSQL Pro. Converting in the browser needs no account.

How big can the file be?

CSV and NDJSON are read as they stream in, so files of several gigabytes work in the browser. Spreadsheets and JSON documents are read whole, so their limit is the memory the browser gives the page. The desktop app takes files of any size, and the API takes files up to 50 GB.

Which databases does it write SQL for?

PostgreSQL, MySQL, MariaDB, SQLite, SQL Server and Oracle. It can also write the cleaned table as CSV or JSON.

Which databases can it convert from?

Dumps from MySQL 5.5 to 9, MariaDB 10.3 to 12, PostgreSQL 10 and later, SQL Server 2017 and later and Oracle 11g and later, and SQLite database files. Each one converts into a script for any of the six databases.

Does the database have to be running?

No. The converter reads the dump file, so the source database doesn't run anywhere. The script it writes loads with the target's own client, such as psql or mysql.

What does a database conversion leave out?

Views, triggers, procedures, functions and events, which each database writes in its own language. The report lists them by name; the tables, keys, indexes and rows are all in the script.

What about a workbook with several sheets?

The first visible sheet is converted. When a workbook has more, pick another under Sheet.

How does it know whether a date is day-first or month-first?

It looks for a date that can only be read one way, such as 25/03/2026, and reads the whole column that way; the report shows which date decided it. When no date decides it, choose the order in the options.